SET ANSI_NULLS ON<br>GO<br>SET QUOTED_IDENTIFIER ON<br>GO<br>CREATE DATABASE [royal]<br>GO<br>USE [royal]<br>GO<br>IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoomInfo]') AND type in (N'U'))<br>BEGIN<br>CREATE TABLE [dbo].[RoomInfo](<br> [RoomNo] [int] NOT NULL,<br> [FloorNo] [int] NOT NULL,<br> [Status] [varchar](100) NOT NULL,<br> [AssignedTo] [varchar](100) NOT NULL,<br> CONSTRAINT [PK_RoomInfo] PRIMARY KEY CLUSTERED <br>(<br> [RoomNo] ASC<br>)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]<br>) ON [PRIMARY]<br>END<br>INSERT INTO [RoomInfo] VALUES (1001,1,'Cleaned','Kim')<br>INSERT INTO [RoomInfo] VALUES (1002,1,'Cleaned','Adachi')<br>INSERT INTO [RoomInfo] VALUES (1003,1,'Not Cleaned','John')<br>INSERT INTO [RoomInfo] VALUES (1004,1,'Cleaned','Sue')<br>INSERT INTO [RoomInfo] VALUES (2001,2,'Cleaned','Joe')<br>INSERT INTO [RoomInfo] VALUES (2002,2,'Not Cleaned','Kerry')<br>INSERT INTO [RoomInfo] VALUES (2003,2,'Cleaned','Roy')<br>INSERT INTO [RoomInfo] VALUES (2004,2,'Cleaned','Carter')<br>INSERT INTO [RoomInfo] VALUES (3001,3,'Cleaned','Arnold')<br>INSERT INTO [RoomInfo] VALUES (3002,3,'Not Cleaned','Shane')<br>INSERT INTO [RoomInfo] VALUES (3003,3,'Cleaned','Kim')<br>INSERT INTO [RoomInfo] VALUES (3005,3,'Not Cleaned','Carter')<br>INSERT INTO [RoomInfo] VALUES (4001,4,'Cleaned','Shane')<br>INSERT INTO [RoomInfo] VALUES (4002,4,'Not Cleaned','Sherry')<br>INSERT INTO [RoomInfo] VALUES (4003,4,'Cleaned','Arnold')<br>INSERT INTO [RoomInfo] VALUES (4004,4,'Not Cleaned','John')<br><br>GO<br>SET ANSI_NULLS ON<br>GO<br>SET QUOTED_IDENTIFIER ON<br>GO<br>IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[loginuser]') AND type in (N'U'))<br>BEGIN<br>CREATE TABLE [dbo].[loginuser](<br> [Username] [varchar](50) NULL,<br> [Password] [varchar](50) NULL<br>) ON [PRIMARY]<br>END<br>INSERT INTO [loginuser] VALUES ('manager','password')<br>INSERT INTO [loginuser] VALUES ('assistant','password')<br>GO<br>SET ANSI_NULLS ON<br>GO<br>SET QUOTED_IDENTIFIER ON<br>GO<br>IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Employees]') AND type in (N'U'))<br>BEGIN<br>CREATE TABLE [dbo].[Employees](<br> [Name] [varchar](50) NULL,<br> [Designation] [varchar](50) NULL,<br> [Address] [varchar](50) NULL,<br> [Telephone] [varchar](50) NULL,<br> [Fax] [varchar](50) NULL,<br> [EMail] [varchar](50) NULL,<br> [ID] [int] IDENTITY(1,1) NOT NULL<br>) ON [PRIMARY]<br>END<br>INSERT INTO [Employees] VALUES ('Kim','Cleaning Staff','California','0015688489','0015688489','kim@royal.com')<br>INSERT INTO [Employees] VALUES ('Adachi','Cleaning Staff','California','0015633443','0015633443','adachi@royal.com')<br>INSERT INTO [Employees] VALUES ('Roy','Cleaning Staff','California','0015623452','0015623452','roy@royal.com')<br>INSERT INTO [Employees] VALUES ('Carter','Cleaning Staff','California','0015621356','0015621356','carter@royal.com')<br>INSERT INTO [Employees] VALUES ('Sherry','Cleaning Staff','California','0015688960','0015688960','sherry@royal.com')<br>INSERT INTO [Employees] VALUES ('Kerry','Cleaning Staff','California','0015665740','0015665740','kerry@royal.com')<br>INSERT INTO [Employees] VALUES ('Shane','Cleaning Staff','California','0015644988','0015644988','shane@royal.com')<br>INSERT INTO [Employees] VALUES ('John','Cleaning Staff','California','0015600968','0015600968','john@royal.com')<br>INSERT INTO [Employees] VALUES ('Sue','Cleaning Staff','California','001564539','001564539','sue@royal.com')<br>INSERT INTO [Employees] VALUES ('Arnold','Cleaning Staff','California','0015634690','0015634690','arnold@royal.com')<br>INSERT INTO [Employees] VALUES ('Ann','Manager','California','0015643790','0015643790','ann@royal.com')<br>INSERT INTO [Employees] VALUES ('Swan','Assistant','California','0015622486','0015622486','swan@royal.com')<br>INSERT INTO [Employees] VALUES ('Joy','Assistant','California','0015644667','0015644667','joy@royal.com')
- 1
- jingjiping2013-01-26代码格式有点乱,
- 粉丝: 3
- 资源: 8
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C#ASP.NET大型商城系统源码带数据库文档数据库 SQL2008源码类型 WebForm
- (全新整理)中国高校各专业录取分数线、招生计划、分段表数据(2008-2023年)
- 服务端开发复习资料MyBatis与Spring框架
- 中国A股上市公司真实盈余管理REM计算数据(2000-2023年)
- 嵌入式系统开发.docx
- 服务端后端开发复习资料:主流框架详解及应用 - Spring与MyBatis深入剖析
- AI程序源码最新,chat程序源码,支持多个国家语言
- C#ASP.NET自动排课系统源码 大学自动排课系统源码数据库 SQL2008源码类型 WebForm
- mysql数据库项目.docx
- 基于MATLAB的常用智能算法源码及案例