-
Notifications
You must be signed in to change notification settings - Fork 0
/
LAB_1(table creating).sql
67 lines (58 loc) · 2.41 KB
/
LAB_1(table creating).sql
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
CREATE DATABASE CSE_3B_364
CREATE TABLE DEPOSIT(
ACTNO INT,
CNAME VARCHAR(50),
BNAME VARCHAR(50),
AMOUNT DECIMAL(8,2),
ADATE DATETIME );
CREATE TABLE BRANCH(
BNAME VARCHAR(50),
CITY VARCHAR(50)
);
CREATE TABLE CUSTOMERS(
CANME VARCHAR(50),
CITY VARCHAR(50));
CREATE TABLE BORROW(
LOANNO INT,
CNAME VARCHAR(50),
BNAME VARCHAR(50),
AMOUNT DECIMAL(8,2));
INSERT INTO DEPOSIT VALUES(101,'ANIL','VREC',1000,'1995-3-1')
SELECT *FROM DEPOSIT
INSERT INTO DEPOSIT VALUES(102,'SUNIL','AJNI',5000,'1996-1-4')
INSERT INTO DEPOSIT VALUES(103,'MEHUL','KABOLIBAGH',3500,'1995-11-17')
INSERT INTO DEPOSIT VALUES(104,'MADHURI','CHANDNI',1200,'1995-12-17')
INSERT INTO DEPOSIT VALUES(105,'PRAMOD','M.G ROAD',3000,'1996-3-27')
INSERT INTO DEPOSIT VALUES(106,'SANDEEP','ANDHERI',2000,'1996-3-31')
INSERT INTO DEPOSIT VALUES(107,'SHIVANI','VIRAR',1000,'1995-9-5')
INSERT INTO DEPOSIT VALUES(108,'KRANTI','NEHRU PLACE',5000,'1995-7-2')
INSERT INTO DEPOSIT VALUES(109,'MINU','POWAI',7000,'1995-8-10')
INSERT INTO BRANCH VALUES ('VRCE','NAGPUR')
SELECT *FROM BRANCH
INSERT INTO BRANCH VALUES ('AJNI','NAGPUR')
INSERT INTO BRANCH VALUES ('KAROLIBAUGH','DELHI')
INSERT INTO BRANCH VALUES ('CHANDI','DELHI')
INSERT INTO BRANCH VALUES ('DHARAMPETH','NAGPUR')
INSERT INTO BRANCH VALUES ('M.G ROAD','BANGLORE')
INSERT INTO BRANCH VALUES ('ANDHERI','BOMBAY')
INSERT INTO BRANCH VALUES ('VIRAR','BOMBAY')
INSERT INTO BRANCH VALUES ('NEHRU PLACE','DELHI')
INSERT INTO BRANCH VALUES ('POWAI','BOMBAY')
INSERT INTO CUSTOMERS VALUES ('ANIL','CALCUTTA')
INSERT INTO CUSTOMERS VALUES ('SUNIL','DELHI')
INSERT INTO CUSTOMERS VALUES ('MEHUL','BARODA')
INSERT INTO CUSTOMERS VALUES ('MANDAR','PATNA')
INSERT INTO CUSTOMERS VALUES ('MADHURI','NAGPUR')
INSERT INTO CUSTOMERS VALUES ('PRAMOD','NAGPUR')
INSERT INTO CUSTOMERS VALUES ('SANDIP','SURAT')
INSERT INTO CUSTOMERS VALUES ('SHIVANI','BOMBAY')
INSERT INTO CUSTOMERS VALUES ('KRANTI','BOMBAY')
INSERT INTO CUSTOMERS VALUES ('NAREN','BOMBAY')
INSERT INTO BORROW VALUES(201,'ANIL','VRCE',1000.00)
INSERT INTO BORROW VALUES(206,'MEHUL','AJNI',5000.)
INSERT INTO BORROW VALUES(311,'SUNIL','DHARAMPETH',3000.00)
INSERT INTO BORROW VALUES(321,'MADHURI','ANDHERI',2000.00)
INSERT INTO BORROW VALUES(375,'PRAMOD','VIRAR',8000.00)
INSERT INTO BORROW VALUES(481,'KRANTI','NEHRU PALACE',3000.00)
SELECT CNAME,ACTNO,AMOUNT FROM DEPOSIT
SELECT LOANNO,AMOUNT FROM BORROW