Search of table names
问题 I use the following to search for strings in my stored procedures: use DBname SELECT Name FROM sys.procedures WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%xxx%' Is it easy to amend the above so that it searches Table names in a specific db "DBname" ? 回答1: I'm using this and works fine SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '%%' 回答2: select name from DBname.sys.tables where name like '%xxx%' and is_ms_shipped = 0; -- << comment out if you really want to see them 回答3: I am