现有一个字段pk_glorgbook,如何查询这个字段在哪张表中呢?
现在的数据库中的用户表有2000多个,没法挨个看.
大家能不能写个sql语句?
谢谢!

解决方案 »

  1.   

    这里是sql server版的解决方案.select b.Name as TableName
    from syscolumns as a
    inner join sysobjects as b on a.ID=b.ID
    where a.Name='pk_glorgbook'好使.大家在oracle下面没有对应的方案吗?
      

  2.   

    select table_name from user_tab_columns where  COLUMN_NAME=upper('id')
      

  3.   

    user_tab_columns   恩  就是这个
      

  4.   

    select table_name from user_tab_columns where column_name = UPPER('pk_glorgbook');
      

  5.   

    select table_name from user_tab_columns where column_name = UPPER('pk_glorgbook');