Insert into Statement in SQL - How to insert records into a table, Insert data into a table


Insert into Statement in SQL - How to insert records into a table, Insert data into a table

The INSERT INTO Statement is used to insert new records or new row into a table. There are two ways to insert records into a table.

Inserting whole records into a table row:-

This syntax is used to insert the all records or columns into a table. we can not leave any blank record into a row in a table with this syntax.

Syntax:-

insert into <table_name> values(value1,value2,.........value n)

Example:-

insert into student_info values('John','M.Tech','California',5647839)


Inserting few records into a Table:-

This syntax is used to insert some values into a table row. Its not recommended you should insert all records into a table row, you can insert values which you want to insert.

Syntax:-

insert into <table_name>(column_name1,column_name2,column_name3,.......column_name n) values(value1,value2,value3,.........,value n)

Example:-

insert into student_info(stu_name,stu_address,stu_course) values('John','California','M.tech')

{ 0 comments... read them below or add one }

Post a Comment