Select存储过程查询
Select Stored procedure query
我正在尝试 select 我的数据库中的某些存储过程。
我想要的是所有以Get_
开头的存储过程,但我无法得到正确的结果。由于某种原因,它似乎忽略了 _
。 运行 SQL Server 2019 开发者版。
这是我的代码:
select *
from information_schema.routines
where routine_type = 'PROCEDURE' and specific_name like 'Get_%'
下划线 _
字符是 SQL 服务器 t-sql 中的通配符。使用 LIKE 'Get[_]%'
明确匹配字符串中的实际下划线。
来自 documentation - “[ ](通配符 - 要匹配的字符)”:
Matches any single character within the specified range or set that is
specified between brackets [ ]. These wildcard characters can be used
in string comparisons that involve pattern matching, such as LIKE and
PATINDEX.
我正在尝试 select 我的数据库中的某些存储过程。
我想要的是所有以Get_
开头的存储过程,但我无法得到正确的结果。由于某种原因,它似乎忽略了 _
。 运行 SQL Server 2019 开发者版。
这是我的代码:
select *
from information_schema.routines
where routine_type = 'PROCEDURE' and specific_name like 'Get_%'
下划线 _
字符是 SQL 服务器 t-sql 中的通配符。使用 LIKE 'Get[_]%'
明确匹配字符串中的实际下划线。
来自 documentation - “[ ](通配符 - 要匹配的字符)”:
Matches any single character within the specified range or set that is specified between brackets [ ]. These wildcard characters can be used in string comparisons that involve pattern matching, such as LIKE and PATINDEX.