none
sql server 2005 怎么对两个表的字段进行比较~~~~ RRS feed

答案

  • SELECT column_name=syscolumns.name, datatype=systypes.name, length=syscolumns.length 
    FROM sysobjects 
    JOIN syscolumns ON sysobjects.id = syscolumns.id 
    JOIN systypes ON syscolumns.xtype=systypes.xtype 
    WHERE sysobjects.name in ('tb1', 'tb2')
    GROUP BY syscolumns.name, systypes.name, syscolumns.length
    


    歡迎參觀我的Blog.NET菜鳥自救會
    2010年11月1日 2:53