-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmyHostel.sql
More file actions
52 lines (42 loc) · 1.05 KB
/
myHostel.sql
File metadata and controls
52 lines (42 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use master
go
alter database myHotel set single_user with rollback immediate
DROP database myHotel
create database myHotel
go
use myHotel
go
--use table myHotel-ROOM
create table rooms(
roomid int Identity(1,1) primary key,
roomNo varchar(250) not null unique,
roomType varchar(250) not null,
bed int not null,
price bigint not null,
booked varchar(50) default 'NO'
);
create table customer(
cid int Identity(1,1) primary key,
cname varchar(250) not null,
mobile bigint not null,
nationality varchar(250) not null,
gender varchar(50) not null,
dob varchar(50) not null,
idproof varchar(250) not null,
--address varchar(350) not null,
checkin varchar(250) not null,
checkout varchar(250),
chekout varchar(250) not null default 'NO',
roomid int not null,
foreign key (roomid) references rooms(roomid)
);
create table employee(
eid int identity(1,1) primary key,
ename varchar(250) not null,
mobile bigint not null,
gender varchar(50) not null,
emailid varchar(120) not null,
username varchar(150) not null,
pass varchar(150) not null
type nvarchar(150) not null,
);