Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007

    Thumbs up Unanswered: 'Include clause' in Create Index syntax

    What is the equivalent for INCLUDE clause (in Create index syntax) in SQL Server 2000.
    SQL Server 2005 will support Include clause in Create index syntax . How to attain it in SQL Server 2000

    Example : I have below query executable in SQL Server 2005
    CREATE INDEX Index_Name ON mytable(col1 ASC) INCLUDE (name,id);
    What is the equivalent for the above query in SQL server 2000

    Thanks ,

  2. #2
    Join Date
    Feb 2004
    One Flump in One Place
    There is none. Include was new to 2005.

    CREATE INDEX Index_Name ON mytable(col1, name,id ASC)
    IS the closest. NOTE - you don't need to include any columns that are in your clustered index in the include - so if you cluster on ID you don't actually need it in the non-clustered index.

    pootle flump
    ur codings are working excelent.

Posting Permissions

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