DMS final exam questions
DMS final exam questions
ii) Add new attribute hisal and avgsal with datatype Number(10) and
Number(12) respectively to Salary table.
iii) Modify the width of hisal to 20 for Salary Table.
42.i) Create table Vehicle with attribute (V_id, Chassis_No, Type,
Number_Of_Wheels)
ii) Add one attribute to Vehicle Table as (Number_Of_Axle).
43.i) Create table customer with ID, LastName, FirstName, and Age columns
where ID, LastName, FirstName will NOT accept NULL values.
ii) For the above created customer table, specify the check constraint on age
column as Age must be greater than 18.
44.Create table student with following attributes (roll_no, name, city, marks,
result).
Write queries for the following:
i) Display all students having result as first class.
ii) Update roll-no of each student by adding 18 to it.
iii) Display student whose city is ‘Mumbai’
45.Consider given Schema. Write SQL Command for following statement.
Product (P_id, Name, Quantity, Price);
Supplier(S_id, S_name, P_id, Contact_no)
Manufacturer(M_id, M_name, Owner, City)
i. Change contact_no for S-123 supplier with new number as
“9876543210”. ii. Add following record for new manufacturer.
Id = 123, name = xyz , Owner = jack , city = Delhi
46.Consider the following database Employee(Emp_id, emp_name, emp_city,
emp_addr, emp_Dept, join_date)
i) Display the emp_id of employee who live in city ‘Mumbai’ or ‘Delhi’. ii)
Change employee name, ‘Akash’ to ‘Jayesh’.
iii) Display the total number of employee whose dept number is 5.