Hi I want to insert a table values from the same table is it possible?
Ex : I'm trying to insert like this
insert into emplyeee values (select # * from employee)
Thanks in advance
Hi I want to insert a table values from the same table is it possible?
Ex : I'm trying to insert like this
insert into emplyeee values (select # * from employee)
Thanks in advance
leave out the value
keyword:
insert into employee
select * from employee
Assuming there are no unique or primary key constraints of course.
Yes you can:
insert into employee (Column1,Column2,Column3)
select Column1,Column2,Column3 from employee
You should specify all the non-identity columns if you have an identity field, as you will not be allowed to insert the identity values explicitly.