Respuesta :
DML stands for Data Manipulation Language.
SQL DML statements consist of insert, update and delete statements.
Out of these three, insert is used to add new data to the table.
The update command modifies the existing data in the given table.
The delete command removes the data from the given table.
Syntax
INSERT INTO table_name ( column1, column2, …….. )
VALUES ( value1, value2, ……… )
The table_name represents the table in which data is to be inserted.
All the columns in the table_name need to be specified in the brackets in the insert into clause.
All the values in the values clause should correspond to the columns, both in the order in which the columns are mentioned and the data type of the values should match the respective column.
Example
Consider the table Person consisting of columns id, name, gender having data type integer, varchar and varchar, respectively.
In order to add data to all the columns of the Person table, the command is as follows.
Insert into Person ( id, name, gender )
Values ( 101, “Alexis”, “Male” );
In the above command, value is present for each column in the respective order. Also, the format of the data match the format of the columns.
Other versions of the insert command add data only to some columns in the table.
Insert into Person ( id, name )
Values ( 102, “Aayesha” );
The above command adds data only to two columns as mentioned.
Also, null value can be added using insert command.
Insert into Person ( id, name, gender )
Values ( 103, “Brainly dot com”, null );
Since null value appears at number three, the corresponding column to this value is also number three, i.e., gender column.
This inserts null value as the gender for Brainly dot com.