wareinfo_view.sql
来自「一个基本的酒店管理系统」· SQL 代码 · 共 40 行
SQL
40 行
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'V' AND name = 'WareInfo_view')
BEGIN
PRINT 'Dropping View WareInfo_view'
DROP View WareInfo_view
END
GO
/******************************************************************************
** File:
** Name: WareInfo_view
** Desc:
**
** This template can be customized:
**
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
PRINT 'Creating View WareInfo_view'
GO
CREATE View WareInfo_view
as
select wid,(select ctype from consumetype where cid=wcid)as type,wname,wprice,wchar,wunit from wareinfo
GO
GRANT SELECT ON WareInfo_view TO PUBLIC
GO
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?