开发者

How to retrieve create statement for table from db in C#

开发者 https://www.devze.com 2022-12-09 04:23 出处:网络
How to retrieve create statement for table from db in C#开发者_Go百科? I need to create a script file containing create statement

How to retrieve create statement for table from db in C#开发者_Go百科?

I need to create a script file containing create statement for an existing table in db using C#.

I can generate create statement of storedproc using sp_helptext but can't generate it for table.

Please help.


this is joke.

  1. use sqlmetal.exe and compile output.
  2. use DataContext.CreateDatabase (use Log property of DataContext to get SQL Code)


It's not supported for tables although a quick google gives a script

http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/28eeb603-1607-4b56-9461-3c0502cbec9c

0

精彩评论

暂无评论...
验证码 换一张
取 消