Insert Multiple Records using multiple ways

Rajesh_Kumar
Posted by Rajesh_Kumar under Sql Server category on | Points: 40 | Views : 601
1st Way:-
insert into project_master(project_id,project_name,employee_id)
values(1,'Medical System',1);
insert into project_master(project_id,project_name,employee_id)
values(2,'Resume Manager',25);
insert into project_master(project_id,project_name,employee_id)
values(3,'Job Site',100);

2nd Way:-
insert into project_master(project_id,project_name,employee_id)
select 1,'Medical System',1
union all
select 2,'Resume Manager',25
union all
select 3,'Job Site',100;

3rd Way:-
insert into project_master(project_id,project_name,employee_id)
values(1,'Medical System',1),(2,'Resume Manager',25),(3,'Job Site',100);

Comments or Responses

Login to post response