Copying Sql Table Layout

  • Hi

    I'm new to sql server 2000 so I apologise if this seems like a silly question!

    I have a sql database setup with one table inside the database. I'd like to duplicate this table structure, all the fields etc into a new table - I don't want to import any of the records into the new table. Is there a quick and simple way for me to do this?

    Many thanks

    Kerry

  • Using Enterprise Manager

    Select the database

    Expand Tables

    Right click on the table name

    Select All Tasks

    Select Generate SQL Script

    Open the file created - change the table name to the new name.

    Save the file

    Open the file using Query Analyzer

    Execute the file ...

    You might have to modify any script section which defines indexes/constraints

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Thank you very much!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply