select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME ='tablename'

解决方案 »

  1.   

    select * into newtable where 1=2
      

  2.   

    select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME ='tablename'
      

  3.   

    exec sp_MShelpcolumns N'dbo." + strTableName + "', null, 'id', 1sql server 2000
      

  4.   

    SELECT NAME FROM SYSOBJECTS WHERE XTYPE= 'U' ORDER BY NAME
      

  5.   

    sp_MShelpcolumns 'tablename'

    select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME ='tablename'其它都不对
    7.0就都行