How to get script ?

  • Hi,

    I have created some tables in my database.And I want to get the 'CREATE TABLE xxx' script for those tables.

    We can get the create table script from the SQL Query Analyzer, but I want to get it using some stored procedure.

    Actually I will be needing that script in ASP.NET so that I can save it in some .sql file using the vb. code.

    In this way I want to generate a seperate file for each table in my database.

    Could antbody tell me how to get it...

    Thanks.

     

  • Try some SQL-DMO scripting.

     

    --------------------
    Colt 45 - the original point and click interface

  • Hi,

    thanks for ur reply.

    But could you pls tell me wat is SQL-DMO ? and how should I go ahead with it ?

     

  • Check Books Online. All the information you need should be in there.

    Also, a google search might provide some helpful info.

     

    --------------------
    Colt 45 - the original point and click interface

  • sp_help @tablename

    maybe help you

Viewing 5 posts - 1 through 4 (of 4 total)

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