All pastes #12405 Raw Edit

Anonymous

public text v1 · immutable
#12405 ·published 2005-05-23 06:12 UTC
rendered paste body
IF EXISTS (SELECT name 
	   FROM   sysobjects 
	   WHERE  name = 'proc_getDepartments' 
	   AND 	  type = 'P')
    DROP PROCEDURE proc_getDepartments
GO

CREATE PROCEDURE proc_getDepartments
AS
	Select DepartmentID, Description FROM Departments ORDER BY Description
GO

-- =============================================
-- example to execute the store procedure
-- =============================================
proc_getDepartments
GO