Practical 4
Practical 4
Practical No : 4
2. Alter table salesman, add constraint Not Null on remarks column and
observe the behavior. Mention your remarks.
3. Insert data in all the tables as per Practical – 2 and check if any
constraint is getting violated.
4. Delete data of salesman ‘S01’ from salesman table and observe the
error. Rewrite the query for alteration of table, so that on deletion of
‘S01’ from salesman, corresponding values associated should also get
deleted.
5. Delete data of order ‘O19001’ from sales_order table and observe the
error. Rewrite the query for alteration of table, so that if you remove
‘O19001’ from sales_order, corresponding values associated should be
set to NULL.
6. Drop primary key constraint on ‘orderno’ from sales_order table.
Observe the error. Write the drop query, so that associated constraints
with ‘orderno’ also gets dropped. Check whether the constraints have
dropped from user_constraints table.