How to: Duplicate Tables (Visual Database Tools)

New: 17 July 2006

A table can appear only once in a database. However, if you want to create a new table that contains some or all of the columns in an existing table, you can create a new table and then copy column information from an existing table.

Note

This operation duplicates only the structure of a table; it does not duplicate any table rows.

To duplicate a table

  1. Make sure you are connected to the database in which you want to create the table and that the database is selected in Object Explorer.

  2. In Object Explorer, right-click Tables and click New Table.

  3. In Object Explorer right-click the table you want to copy and click Design (Modify in SP1 or earlier).

    The table opens in a second Table Designer window.

  4. Select the columns in the existing table and, from the Edit menu, click Copy.

  5. Switch back to the new table and select the first row.

  6. From the Edit menu, click Paste.

  7. From the File menu, click Save table name.

  8. In the Choose Name dialog box, type a name for the new table and click OK.

See Also

Tasks

How to: Copy Columns from One Table to Another (Visual Database Tools)

Other Resources

Working with Tables in Table Designer (Visual Database Tools)

Help and Information

Getting SQL Server 2005 Assistance