获得列名

 

select   name   from   syscolumns   where   id=object_id('ds_field')


或  


select col_name(object_id('table'),1) from sysobjects where name='table'  

 

--读取库中的所有表名


select name from sysobjects where xtype='u'

 

--读取指定表的所有列名


select name from syscolumns where id=(select max(id) from sysobjects where xtype='u' and name='表名')

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-11-07
  • 2021-12-04
  • 2022-12-23
  • 2021-08-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2022-01-14
  • 2022-12-23
  • 2021-07-27
  • 2022-01-21
相关资源
相似解决方案