locked
how to copy schema of a table with out copying the data. RRS feed

  • Question

  • Hi,

           How do i copy just schema of a table with out data in the table.Is this possible?

    Please suggest me the ways fo doing this

     

    Regards

    Chaithanya M

    Monday, September 12, 2011 9:44 AM

Answers

  • hmm, you should rephrase your question, but imho your looking for a simple one:

    SELECT *
    INTO     NewEmptyTable
    FROM     YourTable
    WHERE    0 = 1 ;
    • Proposed as answer by DVR Prasad Monday, September 12, 2011 9:52 AM
    • Marked as answer by Chaithanya Reddy Monday, September 12, 2011 10:09 AM
    Monday, September 12, 2011 9:47 AM