![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Daniol Thomas has Published 209 Articles
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
5K+ Views
To add a new enum column to an existing MySQL table, you can use ALTER command. Following is the syntax:ALTER TABLE yourTableName ADD yourColumnName ENUM('yourValue1', 'yourValue2’....N) NOT NULL;Let us first create a table:mysql> create table DemoTable ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentName varchar(200), StudentAge ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
45 Views
An immutable copy of a Period where all the Period elements are negated can be obtained using the method negated() in the Period class in Java. This method requires no parameters and it returns the Period elements after negating them.A program that demonstrates this is given as followsExample Live Demoimport java.time.Period; ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
1K+ Views
To compare DateTime column with only Date, you need to use the Date() method. Following is the syntax. Below, you need to date in the 'yourDateValue':select *from yourTableName where Date(yourColumnName)='yourDateValue';Let us first create a table:mysql> create table DemoTable ( ArrivalTime datetime ); Query OK, 0 rows affected (0.74 sec)Following ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
661 Views
To delete record with the lowest id, you can use the following syntax:delete from yourTableName order by yourColumnName limit 1;Let us first create a table:mysql> create table DemoTable ( Id int, Name varchar(20) ); Query OK, 0 rows affected (0.75 sec)Following is the query to insert records in ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
118 Views
Grouping related SQL statements into a batch and executing/submitting them at once is known as batch processing. The Statement interface provides methods to perform batch processing such as addBatch(), executeBatch(), clearBatch().Follow the steps given below to perform batch updates using the PreparedStatement object:Register the driver class using the registerDriver() method ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
871 Views
To alter row_format to dynamic in MySQL, following is the syntax:ALTER TABLE yourTableName ROW_FORMAT=DYNAMIC;Let us first create a table:mysql> create table DemoTable ( CustomerId int NOT NULL AUTO_INCREMENT PRIMARY KEY, CustomerName varchar(200), CustomerAge int, CustomerAddress varchar(200) ); Query OK, 0 rows affected (0.73 sec)Let us check ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
626 Views
Grouping related SQL statements into a batch and executing/submitting them at once is known as batch processing. The Statement interface provides methods to perform batch processing such as addBatch(), executeBatch(), clearBatch().Follow the steps given below to perform batch updates using the CallableStatement object:Register the driver class using the registerDriver() method ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
2K+ Views
To set a variable in MySQL, you need to use the SET command. Following is the syntax:set @yourVariableName:=yourValue; select *from yourTableName where yourColumnName=@yourVariableName;Let us first create a table:mysql> create table DemoTable ( Id int, FirstName varchar(20), LastName varchar(20) ); Query OK, 0 rows affected (0.83 sec)Following is ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
200 Views
Not all the databases support batch processing therefore before proceeding with batch updates in your application. You need to verify whether the database you are trying to communicate supports batch processing/batch updates or not.You can do so using the supportsBatchUpdates() method of the DatabaseMetaData interface.Follow the steps given below:Register the ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
Daniol Thomas
5K+ Views
To process an SQL statement, you need to follow the steps given below:Establish the connection.Create a statement.Execute the statement/query.Process the result.Close the connection.Establishing a ConnectionTo process SQL statements first of all you need to establish connection with the desired DBMS or, file System or, other data sources.To do so, Register ... Read More