Creates a temporary table that reports errors when inserting data into a temporary table.
A start prompt does not open the primary key, and then the primary key is turned on to prompt the above error exception.
Find information from the Internet did not find, and then to the group to ask you Daniel, a Daniel told me is not set the primary key.
I took a closer look at the hint and realized that I had set the primary key temporarily.
Code before the primary key:
CREATE TABLE #TT (
courseid int,
UserId int,
ClassId int
)
INSERT
into
#TT
(CourseID , UserId, ClassId)
SELECT
CourseID,
UserId,
ClassId
Execution will report that the table ' #TT ' does not have an identity attribute. Unable to perform SET operation ' ERROR
After you modify the code:
CREATE TABLE #TT (
courseid int PRIMARY KEY,
UserId int,
ClassId int
)
INSERT
into #TT
(CourseID, UserId, ClassId)
SELECT
CourseID,
UserId,
ClassId
No more errors.
Then I put primary key this keyword removed, SQL Server and no error. I don't know what's going on now!
Described above is a small set of SQL Server stored procedures introduced to the table #TT ' no identity property cannot perform SET operation ' ERROR, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!