比较来自不同表的两行
问题描述:
我在同一个数据库中有两个表.我想比较这些表中的行以生成日志文件,该日志文件包含两个表项中是否有任何更改的详细信息.
i have two tables in the same database.i want to compare the rows in these table to generate log files which have details if there is any change in the two table entries.
答
这可能会有所帮助:
http: //weblogs.sqlteam.com/jeffs/archive/2007/05/02/sql-server-2005-using-except-and-intersect-to-compare-tables.aspx [
This might help:
http://weblogs.sqlteam.com/jeffs/archive/2007/05/02/sql-server-2005-using-except-and-intersect-to-compare-tables.aspx[^]
Regards
Espen Harlinn
是比较,最快和最简单的比较sql表的方法 ^ ].
Shortes,fastest and easiest way to compare sql tables HERE[^].
您可以将JOIN Query语句与AND语句一起使用..
you use the statement of JOIN Query with AND statement..