Sami
Sami

Reputation: 3976

SQL Multi insert

I am trying to multi insert in my table but getting error.

My query is:

insert into tbl_temp(e_id, t_id, status, type)
select id from tbl_basicinfo where emp_id = 91 and employee_id <> 7119, 289, 1, 2

it gives error:

Msg 102, Level 15, State 1, Line 2 Incorrect syntax near ','.

what is the issue?

Thanks.

Upvotes: 0

Views: 136

Answers (1)

Grisha Weintraub
Grisha Weintraub

Reputation: 7986

insert into tbl_temp(e_id, t_id, status, type)
select id, 289, 1, 2 from tbl_basicinfo where emp_id = 91 and employee_id <> 7119

Upvotes: 5

Related Questions