I am creating sequence in SQL Server with the following code. But it displays error as unknown object type. Please give a solution
Here\'s my code :
SQL Server 2008 can't create sequences, Sequence objects apply to SQL Server 2012 through current versions.
https://msdn.microsoft.com/es-es/library/ff878091(v=sql.120).aspx
You can use an IDENTITY in your table instead, for example:
CREATE TABLE Person(
Id int IDENTITY(1,1) NOT NULL PRIMARY KEY,
Name varchar(255) NOT NULL
);
The starting value for IDENTITY is 1, and it will increment by 1 for each new record.
http://www.w3schools.com/sql/sql_autoincrement.asp