selectroombytype.sql

来自「一个基本的酒店管理系统」· SQL 代码 · 共 51 行

SQL
51
字号
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Select_RoomInfoByType')
	BEGIN
		PRINT 'Dropping Procedure Select_RoomInfoByType'
		DROP  Procedure  Select_RoomInfoByType
	END

GO

PRINT 'Creating Procedure Select_RoomInfoByType'
GO
CREATE Procedure Select_RoomInfoByType
@RoomType varchar(20)
AS

/******************************************************************************
**		File: 
**		Name: Select_RoomInfoByType
**		Desc: 根据房间类型查寻房间信息 ,该储存过程使用了视图RoomInfo_value
**
**		This template can be customized:
**              
**		Return values:
** 
**		Called by:   
**              
**		Parameters:
**		Input							Output
**     ----------							-----------
**
**		Auth: 
**		Date: 
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:				Description:
**		--------		--------				-------------------------------------------
**    
*******************************************************************************/
if('单页显示'=@RoomType)
select * from RoomInfo_value
else
select * from RoomInfo_value where ttype=@RoomType



GO

GRANT EXEC ON Select_RoomInfoByType TO PUBLIC

GO

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?