Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a Stored Procedure Inside Another Store Procedure 2

Status
Not open for further replies.

MynameisLogan

Programmer
Feb 26, 2001
4
PR

Here is a good one, I am new to SQL Server and I need to create a stored procedure that will create several stored procedures and triggers, does anyone know a way to do this or a place were I can find some reference on this.


Thanks
 
The following code although very simplistic shows the general principles of creating a stored procedure within a stored procedure.

create procedure pproc
as
declare @cmd varchar (500)

select @cmd =
'create procedure newproc as select * from information_schema.columns'

exec (@cmd)
go

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top