When there are more database tables, you want to find all the tables that contain a field. -- Syscolumns and sysobjects are database-maintained column set tables and table set tables SELECTcol. nameTableNameFROMsyscolumnscolJOINsysobjectstabONcol. idtab. idANDtab. typeUANDcol. namePhone
When there are more database tables, you want to find all the tables that contain a field. -- Syscolumns and sysobjects are columns and SELECT col tables maintained by the database. name TableName FROM syscolumns col JOIN sysobjects tab ON col. id = tab. id AND tab. type = u and col. name = Phone
When there are more database tables, you want to find all the tables that contain a field.
-- Syscolumns and sysobjects are columns and SELECT col tables maintained by the database. name TableName FROM syscolumns col JOIN sysobjects tab ON col. id = tab. id AND tab. type = 'U' AND col. name = 'phone'