c# - Copy Table to another Table with indexes, triggers, ... NOT trough Sql Server Managment Studio -


this question has answer here:

short situation sketch (i have many databases have same table, can have different indexes or triggers or ...) i'm trying create program can make exact copy of table (including indexes, triggers , other constraints). part of data should copied new database. know can through ssms option generate , publish scripts, great if have 1 or 2 times. i'm faced more databases. i'm looking way in code (or script). have idea?

if dont want use tools within ssms, or other third-party tool generate scripts, may have - use meta-data stored in sql server regarding table, columns, indexes (stored in different information_schema views) retrieve info need, , use build scripts need.

you can see example of with answer.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -