SQL Server中多个表格求出相同列和不同列(答案来自CSDN上SQL专家的回答)
摘要:从不同表格中求出所有列名相同的列(不考虑类型和精度等),注意最后一列的数字3,是查询的表格数目select a.name ,count(1) as tt from syscolumns a,sysobjects b where a.id=b.id and b.xtype='u' and b.name in ('table_1','table_2','table_3')group by a.name...
阅读全文
posted @ 2009-08-06 17:19
浙公网安备 33010602011771号