select o.name from sysobjects o
where xtype='u'
and exists (
  select 1 from syscolumns c
  where id=o.id
  and name='字段名'
  )

解决方案 »

  1.   

    declare @colname varchar(60)
    set @colname='xxx'
    select a.name from sysobjects a,syscolumns b where a.id=b.id and b.name=@colname
      

  2.   

    select O.name 
    from sysobjects O join syscolumns S on O.id=S.id
    where S.name = 'colname'
      

  3.   


    select 
      b.name as 表名,
      a.name as 字段  
    from syscolumns a,sysobjects b   
    where a.id=b.id 
    and a.name like '%字段%'
      

  4.   

    2005写法select name from sys.tables o
    where exists (
      select 1 from sys.columns c
      where [object_id]=o.[object_id]
      and name='HyperID'
      )