Search of table names

前端 未结 9 1228
傲寒
傲寒 2021-01-29 22:10

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%\'
<         


        
9条回答
  •  -上瘾入骨i
    2021-01-29 22:44

    select name
      from DBname.sys.tables
     where name like '%xxx%'
       and is_ms_shipped = 0; -- << comment out if you really want to see them
    

提交回复
热议问题