4

I encounter a problem with the following part of a query:

IF EXISTS (SELECT * FROM sys.sequences seq JOIN sys.schemas sch ON seq.schema_id=sch.schema_id WHERE seq.name=N'LID'  AND sch.name=N'dbo' )
   DROP SEQUENCE [dbo].[LID]
GO

It keeps telling me, that sys.sequences is an unknown object name and seq.schema_id cannot be resolved.

I run SQL Server Express 2008 R2.

How do I Fix this?

1
  • How to fix it? Upgrade to SQL Server 2012 - sequences are a new feature in the 2012 release Commented Oct 9, 2012 at 12:18

1 Answer 1

7

sys.sequences table is not available in sql server 2008

Sequence is introduced in sql server from SQL server 2012

Click here

Sign up to request clarification or add additional context in comments.

1 Comment

found out seconds later and forgot to close this, thank you anyway^^

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.