-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtenant_sql.txt
More file actions
30 lines (25 loc) · 1.15 KB
/
tenant_sql.txt
File metadata and controls
30 lines (25 loc) · 1.15 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
create table owner(
ownerid number(6) primary key,
ownername varchar2(40),
ownerlocation varchar2(100),
isadmin number(1),
ownerpassword varchar2(20)
);
create table tenant(
tenantid number(6) primary key,
tenantname varchar2(40),
tenantproper varchar2(100),
tenantnumber number(10),
tenantaadhar number(12),
tenantrent number(6),
tenantlocation varchar2(40),
ownerid number(6),
foreign key(ownerid) references owner(ownerid)
);
create sequence tenant_seq start with 10;
create sequence owner_seq start with 100;
insert into owner values( owner_seq.nextval , 'Nikhil Kumar', '1-34 Kapu colony Kotarmoor Armoor Nizambad', 1 ,'admin');
insert into tenant values( tenant_seq.nextval , 'Vinay', '1-10/1, Colony, Warangal, Near famous temple', 1234567890, 111123238899, 2000, 'First floor 1', 101 );
insert into tenant values( tenant_seq.nextval , 'Chary', '1-10/1, Colony, Warangal, Near famous temple', 1234567890, 111123238899, 3500, 'First floor 2' , 101 );
insert into tenant values( tenant_seq.nextval , 'Naresh', '1-10/1, Colony, Warangal, Near famous temple', 1234567890, 111123238899, 12000, 'Vishaka showroom', 101 );
commit;