SQL SERVER||4 Ways to Insert Multiple rows in single statement

Published: 28 November 2022
on channel: LearnSQLtoSSIS
242
2

How to insert multiple records into a table with single insert statement in SQL?

There are 4 ways to insert multiple records into a table

First Method:
INSERT INTO EMP_TBL VALUES(1,'Raju','HR')

Second Method:
INSERT INTO EMP_TBL (ID,ENAME,DEPT_NAME)
VALUES(1,'Raju','HR'),
(2,'Karim','IT'),
(3,'Satya','Admin')

THIRD Method:
INSERT INTO EMP_TBL (ID,ENAME,DEPT_NAME)
SELECT 1,'Raju','HR'
UNION ALL
SELECT 2,'Karim','IT'
UNION ALL
SELECT 3,'Satya','Admin'

Fourth Method:
INSERT INTO EMP_TBL (ID,ENAME,DEPT_NAME)VALUES(1,'Raju','HR')


On this page of the site you can watch the video online SQL SERVER||4 Ways to Insert Multiple rows in single statement with a duration of hours minute second in good quality, which was uploaded by the user LearnSQLtoSSIS 28 November 2022, share the link with friends and acquaintances, this video has already been watched 242 times on youtube and it was liked by 2 viewers. Enjoy your viewing!