CREATE TABLE DEPOSIT (ACTNO VARCHAR2(5),CNAME VARCHAR2(18),BNAME VARCHAR2(18),AMOUNT NUMBER(8,2),ADATE DATE);
- INSERT INTO DEPOSIT VALUES('&ACTNO','&CNAME','&BNAME','&AMOUNT','&ADATE');
CREATE TABLE BRANCH(BNAME VARCHAR2(18),CITY VARCHAR2(18));
- INSERT INTO BRANCH VALUES('&BNAME','&CITY');
CREATE TABLE CUSTOMERS(CNAME VARCHAR2(19) ,CITY VARCHAR2(18));
- INSERT INTO CUSTOMERS VALUES('&CNAME','&CITY');
CREATE TABLE BORROW(LOANNO VARCHAR2(5), CNAME VARCHAR2(18), BNAME VARCHAR2(18), AMOUNT NUMBER (8,2));
- INSERT INTO BORROW VALUES('&LOANNO','&CNAME','&BNAME','&AMOUNT');
Queries
Describe deposit, branch.
- desc deposit;
- desc branch;
Describe borrow, customers.
- desc borrow;
- desc customers;
List all data from table DEPOSIT.
List all data from table BORROW.
List all data from table CUSTOMERS.
List all data from table BRANCH.
Give account no and amount of depositors.
- select accno,amount from deposit;
Give name of depositors having amount greater than 4000.
- select cname from deposit where amount>4000;
Give name of customers who opened account after date '1-12-96'
- select cname from deposit where adate>'1-12-96';
0 comments:
Post a Comment