Insertion of Data Into a Table

Let’s insert a record into our table. To insert data into a table, we would need to use the INSERT INTO command. To do this, we’ll use the following syntax:

INSERT INTO table_name (field 1, field2, …) VALUES (value1, value2, …)

When supplying the values to be inserted into the table, the following should be considered while dealing with different data types.

  1. String data types – all the string values should be enclosed in single quotes.

2. Numeric data types – all numeric values should be supplied directly without enclosing

them in single or double quotes.

3. Date data types – enclose date values in single quotes in the format ‘YYYY-MM-DD’.

Insert into student values (12011,'HARISH G','MALE','HDCA',14800)

Inserting Multiple Rows Into a Table

Insert into student values (12012,'NAVEEN S','MALE','DCA',9000),(12013,'VEENA N','FEMALE','ADJP',9600)

On executing the above command, the following appears….