Insert into Clause in SQL | SQL Beginners | DataGuru Naval
Using VALUES Keyword
1)
Insert into tblEmp(Empid, EmpName, EmpDesignation)
Values (101,'ABC','Software Developer')
2)
Insert into TableName
Values (102,'XYZ','SQL Developer')
3)
Use Multiple insert with multiple Values
Insert into tblEmp(Empid, EmpName, EmpDesignation)
Values (101,'ABC','Software Developer')
go
Insert into tblEmp(Empid, EmpName, EmpDesignation)
Values (101,'ABC','Software Developer')
go
Insert into tblEmp(Empid, EmpName, EmpDesignation)
Values (101,'ABC','Software Developer')
4. Use single insert with Multiple values
Insert into tblEmp(Empid, EmpName, EmpDesignation)
Values (101,'ABC','Software Developer'),
(102,'XYZ','SQL Developer'),
(103,'LMN','Database Developer'),
(104,'PQR','Database Administration')
5. Using SELECT Statement
Insert into tblEmp(Empid, EmpName, EmpDesignation)
select Empid, EmpName, EmpDesignation
from tblemployee
6. To Create and insert data into Physical table
select *
into testemp
from tblemp
7. To Create and insert data into Temporary table
select *
into #testemp
from tblemp
temporary table exists till the open session exists. Once opened
session is closed, temporary table deleted permanantly.
On this page of the site you can watch the video online Insert into Clause in SQL | SQL Beginners | DataGuru Naval with a duration of hours minute second in good quality, which was uploaded by the user DataGuru Naval 14 February 2022, share the link with friends and acquaintances, this video has already been watched 67 times on youtube and it was liked by 4 viewers. Enjoy your viewing!