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.
Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.