SQL Server 批量导出存储过程,视图和函数
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’ 时,为函数
不要总是说的很多,却做得很少!
要明白'生于忧患,死于安乐'!

浙公网安备 33010602011771号