SQL & PLSQL
1. DDL Statements: a) Create the table Invoice with fields inv_no (char, Primary key), mv_no(number), cust_id (char), Issue_date(date), return_date(date). Insert data in the table invoice as follows: Inv_no mv_no cust_id issue_date return_date 101 1 a01 21-Dec-06 25-Dec-06 102 3 a02 19-Oct-06 30-Oct-06 ..... b) Modifying Table Structure by adding the new field price (number) and increasing the size of Inv_no. C) Add and Drop Constraints c 1) Add primary key constraint ii) Drop primary key constraint lil) Add Unique key constraint iv) Drop Unique key constraint v) Add check constraint Answer= >create table Invoice (inv_no char (5) primary key, mv_no number (4), cust_id char (3), issue_date date, return_date date); > select * from Invoice; >insert into Invoice values ('101', 1, 'a01', '21-Dec-06', '25-Dec -06'); >alter table Invoice add (price number (7)); >alter table Invoice modify (inv_no char (7)); 1)alter table Invoice add primary key (...
