Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 SQL Server 2008 R2。现在我想编写一条 SQL 语句来查找该表的列中包含单词“happy”的表名。列名like '%abc'可能包含单词
like '%abc'
谁能给我一些想法?
谢谢,V
尝试这个 :
select obj.name from sys.columns col join sys.tables obj on col.name like '%happy%' and col.object_id = obj.object_id