The document provides SQL commands to create three database tables: a salespeople table with fields for salesperson number, name, and city; an orders table with fields for order number, date, salesperson number, and amount; and a customers table with fields for customer number, name, city, rating, and salesperson number. Sample data is inserted into each table.
1 of 1
More Related Content
Rdms
1. Create the following(s):
1) table Salespeople with fields snum, sname, city,
2) table commission Orders table with fields onum, odate, snum, amt
3) table Customers table with fields cnum,cname, city, rating, snum
Ans:
1) create table salespeople_Ravi(snum number(4), sname varchar2(15), city
varchar2(10))
insert into salespeople_Ravi values(1,'Krishna','Lucknow');
insert into salespeople_Ravi values(2,'Arjun','Manglore');
insert into salespeople_Ravi values(3,'Abhijit','Puri');
2) create table commission_order_Ravi(onum number(4), odate date, snum
number(4), amt varchar2(10))
insert into commission_order_Ravi values(301,'14-Aug-2013',1,2000);
insert into commission_order_Ravi values(302,'15-Aug-2013',2,3000);
insert into commission_order_Ravi values(303,'25-Aug-2013',3,4000);
3) create table customer_Ravi(cnum number(4), cname varchar2(15), city
varchar2(15), rating number(4), snum number(4))
insert into customer_Ravi values(49,'Ravi','Kolkata',150,1)
insert into customer_Ravi values(06,'Shashi','Dibrugarh',176,2)
insert into customer_Ravi values(10,'Gyan','Pune',120,3)
update customer_Ravi set cname='Pope' where cnum=10