Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2003
    Posts
    60

    Unanswered: Running Create Table Query From SQL 2005 in SQL 2000

    I had a table in SQL Server 2005 for which I generated the Create Table Script using SQL Server 2005 Generate Script feature. Now I wanted to run it on SQL Server 2000 but it fails. I have used both SQL Server 2000/2005 options in Script for Server Version option but it still fails. I can update the query and use the Alter statement to add the Primary Key but I have other 25 tables like these and I was wondering if there is an easy/automated way using which I don't have to make any modifications. The query from SQL 2005 is shown below -

    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[user_role](
    [role_id] [int] NOT NULL,
    [role_desc] [varchar](30) NULL,
    CONSTRAINT [PK_user_role] PRIMARY KEY CLUSTERED
    (
    [role_id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]

    Thanks,
    Saurav
    Last edited by sajmera; 08-30-07 at 03:25.

Posting Permissions

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