Sorting page, SQL2000, encountered the following problems
Select Identity (INT, 1, 1) as PID, ID, username, classid into # collectioninfos from pk_collection
Select * from # collectioninfos
---
ID is the ID column of the original table, auto-increment.
The database reports the following error:
Server: Message 8108, level 16, status 1, Row 1
You cannot use the select into statement to add an ID column to the '# collectioninfos' table. The table already contains the 'id' column that inherits the identity attribute '.
All the solutions found on the Internet are to remove the logo column. How useful is the removal of the logo column.
Think about it and convert it as follows:
----
Select Identity (INT, 1, 1) as PID,Cast (ID as INT) as ID, Username, classid into # collectioninfos from pk_collectioninfo
Select * from # collectioninfos
Solve the problem.