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 查询,它将返回我的数据库中的所有过程、表和函数的列表我尝试跟踪查询过程但不起作用
SELECT NAME FROM sys.all_objects WHERE type='P'
要返回所有过程(系统过程除外),查询是:-
select * from DBName.information_schema.routines where routine_type = 'PROCEDURE'
对于您可以使用的所有功能
SELECT name AS function_name ,type_desc FROM sys.objects WHERE type_desc LIKE '%FUNCTION%';
对于所有表,查询是:
SELECT * FROM sys.Tables