Assignment 6
Assignment 6
1.CODE :
Create table Customer
(
Customerid Number(5),
CustomerName Number(10),
Address1 Varchar2(30),
Address2 Varchar2(30)
);
select * from Customer;
2. CODE :
3. CODE :
ALTER TABLE Customer
add
(Gender Varchar2(1),
Age Number(3),
PhoneNo Number(10));
select * from Customer;
4. CODE :
insert into customer VALUES(1000, 'ALLEN', '#115 Chicago', '#115 Chicago', 'M', 25,
7878776);
insert into customer VALUES(1001, 'George', '#116 France', '#116 France', 'M', 25, 434524);
insert into customer VALUES(1002, ' Becker', '#114 New York', ', #114 New York', 'M', 45,
431525);
select * from Customer;
5 CODE :
6 CODE:
insert into customer VALUES(1002, 'John', ' #114 Chicago', ' #114 Chicago', 'M', 45, 439525);
7.CODE:
insert into customer VALUES(1002, ' Becker', '#114 New York', ' #114 New York', 'M', 45,
431525);
insert into customer VALUES(1003, 'Nanapatekar', '#114 INDIA', ' #114 INDIA', 'M', 45,
431525);
8.CODE:
-- primary key shouldn’t contain duplicate values but here in the table we have duplicate
values for customerid
9.CODE:
(as primary key not created in the above cannot be altered and the given values are more
than the columns of the table as phoneno is the last one but here we have one more
additional value)
insert into customer VALUES(1002, ' Becker', '#114 New York', ' #114 New York', 'M', 45,
431525, 15000.50);
insert into customer VALUES(1003, 'Nanapatekar', '#114 INDIA', ' #114 INDIA', 'M', 45,
431525, 20000.50);
10.CODE:
12.CODE: