select objs.name as TableName, cols.name as ColName
From sysobjects objs inner join syscolumns cols on (objs.id=cols.id)
where objs.xtype='U' and cols.name='字段名'
SQL Server根据字段得到表名
最新推荐文章于 2023-04-11 15:59:03 发布
本文介绍了一种使用SQL语句从数据库中精确查询指定字段的方法,通过内连接操作,实现了对特定表格和列的有效检索。
2330

被折叠的 条评论
为什么被折叠?



