'ERROR: "IDENTITY" is not valid at this position, expecting ')'
Im trying to reverse engineer a table and when replicating their code I keep running into this error. It keeps happening every time I try to use the IDENTITY after my PRIMARY KEY. Not sure what I'm doing wrong, here's my code Error in question
CREATE TABLE tbl_book (
book_BookID INT PRIMARY KEY NOT NULL IDENTITY (1,1),
book_Title VARCHAR(100) NOT NULL,
book_PublisherName VARCHAR(100) NOT NULL CONSTRAINT fk_publisher_name1 FOREIGN KEY REFERENCES tbl_publisher(publisher_PublisherName) ON UPDATE CASCADE ON DELETE CASCADE,);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
