Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
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:
value
insert into employee select * from employee
Assuming there are no unique or primary key constraints of course.
Add a comment
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.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.