搜索表名 [英] Search of table names
本文介绍了搜索表名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下命令在特定数据库的存储过程中搜索字符串:
I use the following to search for strings within the stored procedures of a specific database:
USE DBname
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%xxx%'
是否很容易修改上面的内容,以便它在特定的数据库DBname"中搜索表名??
Is it easy to amend the above so that it searches Table names in a specific db "DBname" ?
推荐答案
我正在使用这个并且工作正常
I'm using this and works fine
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME LIKE '%%'
这篇关于搜索表名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文