Anonymous
public text v1 · immutableIF 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