Marko
Marko

Reputation: 476

MS-SQL 2012 Synonym for Sequence

On Oracle I can create a synonym for a sequence of another user. Is there a way to do this on MS-SQL 2012?

Upvotes: 1

Views: 1147

Answers (2)

The Sequences in Oracle is used for Columns that going to be autonumber; in SQL Server where the version is lower than SQL2012, you use IDENTITY Property, when you define the table, for example:

CREATE TABLE MyTable
(
idColumn int IDENTITY(1,1),  
descColumn varchar(50)
)

IDENTITY(1,1): this sequence starts with 1, and is incremented by 1.

Meanwhile the new versions of SQL SERVER (2012 & 2014) you can create Sequences, check it here CREATE SEQUENCE (Transact-SQL).

Upvotes: 1

Dbloch
Dbloch

Reputation: 2366

Synonym's on Sequences are not possible in MS SQL.

Upvotes: 1

Related Questions