January 13, 2015 at 12:42 am
I know how to copy and paste data from one table to another table with INSERT and SELECT query.
I just want to know is it possible to do this from "edit top N rows" if you have an auto increment field in both tables?
___________________________________
Computer Enterprise Masoud Keshavarz
I don't care about hell.
If I go there I've played enough Diablo to know how to fight my way out.
January 13, 2015 at 6:36 am
masoudk1990 (1/13/2015)
I know how to copy and paste data from one table to another table with INSERT and SELECT query.I just want to know is it possible to do this from "edit top N rows" if you have an auto increment field in both tables?
There is no edit command in SQL.
You could do a SELECT TOP N with a ORDER BY on the Identity column. But if you're inserting one identity value into another table's identity column, you need to make sure you've used the SET IDENTITY_INSERT statement. And since this can only be on for one table at a time (or could the last time I checked), you need to ensure you turn it off after you're done.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply