TSQL vs. PLSQL

  • In PLSQL you can create and populate a table based on the data and structure of an existing table with one command :

    Create table new as select * from original

    Is there a way to do the same in TSQL?

    Thanks!

    Never mind -

    Select * into

    will do the same thing.

    Edited by - rachel on 06/21/2002 2:28:12 PM

  • One thing of note is that if SELECT * INTO it will create locks for the duration of the process. It is usually better to build table by CREATE TABLE and then do INSERT INTO. This may not fit your needs just a note on the issue.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

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

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