SQL Insert Into - Insert Into Statement In SQL

.
INSERT INTO Query In SQL - How to Insert New Record in a Table?

INSERT INTO statement in SQL is used to insert new records in the table.

INSERT INTO Syntax- 

The basic syntax of the INSERT INTO statement is as follows. In SQL There are two ways to insert the Record in the table Using INSERT Statement.

Way-1
Specifies both the column names and the values to be inserted

Syntax-
SQL Insert into syntax will be as follows 

INSERT INTO table_name (column1, column2, column3, ...)VALUES (value1, value2, value3, ...);

Example -Example of insert statement given below
INSERT INTO Student (Studentname, City, Country,Class,Age ,Branch)VALUES ('RAM', 'DELHI', 'INDIA',10,18,’Science’);

Way-2
Specifies only the values to be inserted, Here we do not specify the column name

Syntax-
SQL Insert into syntax will be as follows 

INSERT INTO table_nameVALUES (value1, value2, value3, ...);

Example
INSERT INTO Student  VALUES ('RAM', 'DELHI', 'INDIA');

Hope !!! Above tutorial on SQL INSERT INTO is helpful for You...

Team,
QA acharya

Tags: SQL Insert into query , Insert syntax in SQL , SQL Insert statement 
.

Post a Comment

0 Comments