Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 11th, 2012  |  syntax: None  |  size: 0.30 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Best way to access SQL statements and Stored Procedures in a database
  2. declare @t table (RowNumber int identity(1,1), Line nvarchar(4000));
  3.  
  4. insert @t (Line) exec sp_helptext 'sp_helptext';
  5.  
  6. select * from @t order by RowNumber;
  7.        
  8. select routine_name, routine_definition from INFORMATION_SCHEMA.routines