Copy Table

Results 1 to 3 of 3

Thread: Copy Table

  1. #1
    Join Date
    Dec 1969

    Default Copy Table

    Does anyone know how to copy a table in SQL Server. I need to do it using SQL and not enterprise manager.<BR>Thanks<BR><BR>I just want to copy a certaiun table and name it something else

  2. #2
    JG Guest

    Default RE: Copy Table

    CREATE TABLE NewTableName(IDField int, field1 varchar(20),...);<BR>INSERT INTO NewTableName(Field1, Field2,...)SELECT Field1, Field2 FROM OldTable;<BR><BR>something along these lines...<BR>check out for more info<BR><BR>good luck<BR><BR>you can also use DROP TABLE TableName to destroy the table

  3. #3
    aspa Guest

    Default RE: Copy Table

    you can also use select into statement to create new table and insert values to fields.<BR>select(col.list) into newtable from oldtable

Posting Permissions

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