Create Table DDL via TSQL

  • Lowell

    SSC Guru

    Points: 323420

    Comments posted to this topic are about the item Create Table DDL via TSQL

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • san_kan1gb

    Grasshopper

    Points: 24

    Hi, thanks for the good article.

    But i tried downloading the compressed file, but it did not download.

     

    Regards.

     

  • Lowell

    SSC Guru

    Points: 323420

    San_kan1gb;

    I believe this article was reposted from the original~12 years ago, i'll see if i can recover the links. the proc has gone through a slew of changes since then..matching the created case of all objects, and a ton of improvements.

    grab the code snippets form page 8 of this thread: it houses the most updated versions of this code.

    https://www.sqlservercentral.com/forums/topic/get-ddl-for-any-sql-2005-table/page/8

    there are things this code does not do, temporal tables , in memory optimized, partitioned tables, tables with custom data type names over 16 chars, and a few other exotics, like xml indexes.

    let us know if you have any questions in that other thread.

    • This reply was modified 7 months ago by  Lowell.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Steve Jones - SSC Editor

    SSC Guru

    Points: 716314

    I've downloaded those files and added them to the article in a zip file.

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

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