I'm using SQL Server Management
and I'm trying to create
a table that has the ID
field that must be auto increment.
However, I can not use the IDENTITY
property, but do everything in script
, in the same hand.
I would like to know how I can do this, since (for example) this does not work (because it's for MySQL):
CREATE TABLE Persons (
ID int NOT NULL AUTO_INCREMENT,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
PRIMARY KEY (ID)
);