☞ To insert a new record into a table in RDBMS, we use INSERT INTO command.
☞ Syntax :
INSERT INTO <table_name> VALUES ( <value1>, <value2>,.......); OR INSERT INTO <table_name>(<column1>, <column2>, <column3>, ............. <columnN>); VALUES ( <value1>, <value2>,<value3>, ..............<valueN>);
☞ Example :
INSERT INTO student VALUES ( 1, "Ruchi", F, "1987-04-04", 5000.50); OR INSERT INTO student (Roll_no, Name, Gender, DOB, Fees) VALUES ( 1, "Ruchi", F, "1987-04-04", 5000.50);
☞ Syntax :
INSERT INTO <table_name>(<column1>, <column2>, <column3>, ............. <columnN>); VALUES ( <value1>, <value2>,<value3>, ..............<valueN>);
☞ Example :
INSERT INTO student (Roll_no, Name, DOB) VALUES ( 1, "Ruchi", "1987-04-04");
☞ Syntax :
INSERT INTO <table_name> VALUES ( <value1>, <value2>,.......); OR INSERT INTO <table_name>(<column1>, <column2>, <column3>, ............. <columnN>); VALUES ( <value1>, <value2>,<value3>, ..............<valueN>);
☞ Example :
INSERT INTO student VALUES ( 1, "Ruchi", NULL, "1987-04-04", NULL); OR INSERT INTO student (Roll_no, Name, Gender, DOB, Fees) VALUES ( 1, "Ruchi", NULL, "1987-04-04", NULL);
☞ Syntax :
INSERT INTO <table_name> VALUES ( <value1>, <value2>,.......), ( <value1>, <value2>,.......), ( <value1>, <value2>,.......);
☞ Example :
INSERT INTO student VALUES ( 2, "Ankit", M, "1989-03-14", 5085.50), ( 3, "Deepika", F, "1988-10-08", 4963.50), ( 4, "Devansh", M, "1988-08-115", 4526.00);