- Best way to access SQL statements and Stored Procedures in a database
- declare @t table (RowNumber int identity(1,1), Line nvarchar(4000));
- insert @t (Line) exec sp_helptext 'sp_helptext';
- select * from @t order by RowNumber;
- select routine_name, routine_definition from INFORMATION_SCHEMA.routines