select a.name,a.[type],b.[definition] FROM sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('P','V','AF') order by a.[name] asc
当 type 为‘ P’ 时,为存储过程
当 type 为‘ V’ 时,为视图
当 type 为‘ AF’ 时,为函数
标签:存储,AF,object,视图,Server,SQL,type,id From: https://www.cnblogs.com/shaopang/p/17642402.html