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

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'

原文地址:https://www.cnblogs.com/hlfei/p/3951661.html