
/****** Object:  StoredProcedure [existsSession] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[existsSession]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
    DROP PROCEDURE [existsSession];
GO
	
CREATE PROCEDURE [dbo].[existsSession]

(
	@SessionID int
)
WITH EXECUTE AS OWNER
AS
	SELECT COUNT(*)
	FROM [Sessions] WHERE [SessionID]=@SessionID
	RETURN
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'Procedure Creation: existsSession Succeeded'
ELSE PRINT 'Procedure Creation: existsSession Error on Creation'
GO
