DBMS Assignment 1
DBMS Assignment 1
DBMS Assignment 1
:06
SUB :DBMS LAB DIV : A
BHARATI VIDYAPEETH’S
INSTITUTE OF MANAGEMENT & INFORMATION TECHNOLOGY,
NAVI MUMBAI
Q1.
DESCRIBE Customers;
CLASS: SYMCA ROLL NO.:06
SUB :DBMS LAB DIV : A
DESCRIPTION VARCHAR2(30),
UNIT_PRICE NUMBER(20),
QTY_ON_HAND NUMBER(15),
SELL_PRICE NUMBER(20)
);
DESCRIBE Item;
OUTPUT :
NAME VARCHAR2(30),
PH_NO NUMBER(20),
CLASS: SYMCA ROLL NO.:06
SUB :DBMS LAB DIV : A
CITY VARCHAR2(15),
PINCODE NUMBER(10),
STATE VARCHAR2(15),
NATIONALITY VARCHAR2(15),
SALEAMT NUMBER(20)
);
DESCRIBE Salesman;
OUTPUT :
OUTPUT :
CLASS: SYMCA ROLL NO.:06
SUB :DBMS LAB DIV : A
a) Retrieve the list of names, phone number and city of all the salesman
OUTPUT :
b) Retrieve information about all the customers available in ‘Nagpur’ and having the
pincode 700405 or 700987
OUTPUT :
OUTPUT :
OUTPUT :
8|Page
e) Find out the Salesman who stay in ‘Pune’ and have a sale amount greater than 5000
OUTPUT :
9|Page
SYMCA DBMS LAB ASSIGNMENT NO : 01 Div: A Roll No : 02
10 | P a g e
b) INSERT INTO Item VALUES(6,'KEYBOARD',100,20,100);
UPDATE Item SET
QTY_ON_HAND=50,SELL_PRICE=SELL_PRICE+0.1*SELL_PRICE WHERE
DESCRIPTION='KEYBOARD';
OUTPUT :
11 | P a g e
12 | P a g e
b)ALTER TABLE Item RENAME COLUMN DESCRIPTION TO PRODUCT;
OUTPUT :
13 | P a g e
Q6) Deleting records
a) DELETE FROM Customers WHERE CITY='Nagpur';
OUTPUT :
14 | P a g e
OUTPUT :
15 | P a g e
8) Delete The Table With All Its Contents
OUTPUT :
9) Truncate Table
TRUNCATE TABLE Item;
OUTPUT :
16 | P a g e
17 | P a g e