Syntex:
CREATE PROCEDURE [dbo].[sp_GetEmployee]Example:
@EmpId INT,
@EmpName VARCHAR(50),
@DOB DATETIME,
@Error VARCHAR(MAX) OUT
AS
BEGIN
SELECT a.EmpName, b.DeptName FROM tblEmployee aJOIN tblDept b ON b.EmpId=a.EmpIdORDER BY a.EmpName DESCIF @@error <> 0SET @Error = ERROR_MESSAGE()END
0 comments:
Post a Comment