程序笔记
随心而记

--取列名

select    

          b.name    

  from    

          sysobjects   a,  

          syscolumns   b    

  where    

          a.id=b.id    

          and    

          a.name='TableName'    

          and    

          a.type='U'

--取表或视图

SELECT   name   FROM   sysobjects   WHERE   type   =   'u'   or type = 'v'

posted on 2008-10-29 12:51    阅读(830)  评论(2编辑  收藏  举报