查询出某个字段属于哪些表

SQL Server写法

select [name] from sysobjects where id in(select id from syscolumns Where name='StudentID')

Oracle写法

select TABLE_NAME from SYS.USER_CONS_COLUMNS where COLUMN_NAME ='StudentID'

posted @ 2014-09-02 16:10  胡狗880601  阅读(170)  评论(0编辑  收藏  举报