In SQL Server, how do I generate a CREATE TABLE statement for a given table?

前端 未结 16 2405
离开以前
离开以前 2020-11-22 11:34

I\'ve spent a good amount of time coming up with solution to this problem, so in the spirit of this post, I\'m posting it here, since I think it might be useful to others. <

16条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 12:05

    If the application you are generating the scripts from is a .NET application, you may want to look into using SMO (Sql Management Objects). Reference this SQL Team link on how to use SMO to script objects.

提交回复
热议问题