[英]How to compare table schema on a database with an sql script file in C#?
Let say I have a table name Anonymous
on a database and I have a file name Anonymous.sql
on my harddrive. 假设我在数据库上有一个表名
Anonymous
,而我的硬盘上有一个文件名Anonymous.sql
。 I want to know if the table's schema is as same as or difference from the schema define in Anonymous.sql
. 我想知道表的架构是否与
Anonymous.sql
定义的架构相同或不同。 The sql file has a CREATE schema. sql文件具有CREATE模式。
My questions are: 我的问题是:
If your table schema is in sql file, you can you beyond comparer software to compare those files. 如果您的表模式在sql文件中,则可以使用比较器软件之外的工具来比较那些文件。
And if you have any changes, change with that software and rerun the table schema in sql server with the prefix "alter table name" 并且,如果有任何更改,请使用该软件进行更改,然后在SQL Server中使用前缀“ alter table name”重新运行表架构。
for software download 用于软件下载
http://beyond-compare.en.softonic.com/ http://beyond-compare.en.softonic.com/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.