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

Pubblicato il: 28 novembre 2022
sul canale di: 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')


In questa pagina del sito puoi guardare il video online SQL SERVER||4 Ways to Insert Multiple rows in single statement della durata di ore minuti seconda in buona qualità , che l'utente ha caricato LearnSQLtoSSIS 28 novembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 242 volte e gli è piaciuto 2 spettatori. Buona visione!