Saturday, 10 June 2017

DBMS Tutorial-1

  1. 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');
  2. CREATE TABLE BRANCH(BNAME VARCHAR2(18),CITY VARCHAR2(18));

    • INSERT INTO BRANCH VALUES('&BNAME','&CITY');
  3. CREATE TABLE CUSTOMERS(CNAME VARCHAR2(19) ,CITY VARCHAR2(18));

    • INSERT INTO CUSTOMERS VALUES('&CNAME','&CITY');
  4. 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

  1. Describe deposit, branch.

    • desc deposit;
    • desc branch;
  2. Describe borrow, customers.

    • desc borrow;
    • desc customers;
  3. List all data from table DEPOSIT.

    • select * from deposit;
  4. List all data from table BORROW.

    • select * from borrow;
  5. List all data from table CUSTOMERS.

    • select * from customers;
  6. List all data from table BRANCH.

    • select * from branch;
  7. Give account no and amount of depositors.

    • select accno,amount from deposit;
  8. Give name of depositors having amount greater than 4000.

    • select cname from deposit where amount>4000;
  9. Give name of customers who opened account after date '1-12-96'

    • select cname from deposit where adate>'1-12-96';
Share:

Related Posts:

  • DBMS Tutorial-3 To Perform various data manipulation commands, aggregate functions and sorting concept on all created tables in previous tutorial. Queries List total deposit from deposit.… Read More
  • DBMS Tutorial-1 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… Read More
  • DBMS Tutorial-2 create table Job ( job_id varchar2 (15), job_title varchar2 (30) , min_sal number (7,2) , max_sal number (7,2)); insert into Job values('&job_id','&job_title','&min_sal','&… Read More

0 comments:

Post a Comment