DBMS Practical List
DBMS Practical List
Table 2: Employee_master
Table 3: Vendor_master
Table 4: Material_master
Field Name Data type Size Constraint
Material_id Varchar2 6 Primary key
Material_desc Varchar2 25
Unit_price Number 6,2
Unit_measure Varchar2 6
Stock number 3
Table 4: Order_master
II Use of Primary Key & Modify the structure of the employee_master table to have
foreign key Through primary key constraint on the field employee_no.
Alter
Q. Write a query to count the no. of vendors who fall in the state
of “uttar pradesh” If the no. of vendors in the state of uttar
pradesh are 3, the result should be as :
RESULT
-------------
Q. Write a query to select the vendor id, name and state of the
vendor whose address2 field has a ‘.’ Contained in it.
Q. Write a query to list the material id, its description and stock
available for those whose unit price falls above 600 but less than
900.
Use of Update Command Q. Write a query to change the address1 of vendor to “186,
circular no. 2” whose vendor id is v1001.
INFORMATION
----------------------
Use of function
MAX ,MIN,AVG: Q. Write a query to select the minimum, maximum and average
salary of the employees working in the organization. The
headings should be smi, smx and sav respectively.
Use of Joins: