Programmatically get the creation of a database table script in .NET.

I need to get a CREATE TABLE script to recreate a specific table in a SQL Server (2000) database, programmatically (I use C #). Obviously, you can do this using Enterprise Manager, but I would like to automate it.

I played with SQLDMO, which offers a backup command, but I'm not sure if this will give an SQL CREATE TABLE script and seems to require creating a SQL Service device, and I would prefer to avoid modifying the database.

+3
source share
2 answers

. sql script, INFORMATION_SCHEMA . , .

+2

Source: https://habr.com/ru/post/1696721/


All Articles