Results 1 to 3 of 3
  1. #1
    jason.3dmagic is offline Member
    Join Date
    Oct 2009
    Posts
    30
    Rep Power
    0

    Question Error in creating a sequence in SQL Server 2005

    I am trying to create a sequence in SQL Server 2005 following is the sql code

    CREATE SEQUENCE SEQ_NAME
    MINVALUE 1
    MAXVALUE 99999
    INCREMENT BY 1
    START WITH 1
    CACHE 20;

    But its giving the error as:

    Msg 102, Level 15, State 1, Line 1
    Incorrect syntax near 'SEQUENCE'.
    Msg 319, Level 15, State 1, Line 5
    Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,750
    Rep Power
    19

    Default

    Um, does SQL Server have sequences?
    That's an Oracle thing only, if I'm not mistaken.

  3. #3
    jason.3dmagic is offline Member
    Join Date
    Oct 2009
    Posts
    30
    Rep Power
    0

    Thumbs up

    Hey Tolls,

    Thanks, I was not aware of the fact that it is available in Oracle only. But when I googled it i saw many forums showing sequence for SQL Server. I will close this thread.

    Regards,
    Jason

Similar Threads

  1. Replies: 7
    Last Post: 05-29-2010, 01:57 PM
  2. Replies: 4
    Last Post: 05-27-2009, 01:15 PM
  3. Connect to SQL server 2005
    By comp in forum JDBC
    Replies: 1
    Last Post: 03-25-2009, 11:25 PM
  4. Replies: 4
    Last Post: 05-21-2008, 06:55 AM
  5. SQL Server 2005 Jdbc connection
    By mgt83 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 07-27-2007, 04:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •