INSERT INTO Query in SQL
INSERT INTO statement is used to insert new records in the table.
INSERT INTO Syntax- The basic syntax of the SELECT statement is as
follows
In SQL There are two way to insert
the Record in table Using INSERT Statement
1- specifies both the column names and
the values to be inserted
Syntax-
SQL>INSERT INTO table_name (column1, column2, column3, ...)VALUES (value1, value2, value3, ...);
2- specifies only the values to be inserted
Synatax-
SQL> INSERT INTO table_nameVALUES (value1, value2, value3, ...);
Example-(1)
SQL> INSERT INTO Student (Studentname, City, Country,Class,Age ,Branch)VALUES ('RAM', 'DELHI', 'INDIA',10,18,’Science’);
Example-(2)
SQL> INSERT INTO Student VALUES ('RAM', 'DELHI', 'INDIA');
0 Comments