Column name
Datatype
Size
Cust-no
Varchar2
6
Prod_no
Varchar2
6
No_of_items_purchased
Number
3
Total_price
Number
15,4
Discount
Number
4
Netamount
Number
10,4


QUERY: 

create table cust_prod_t5
    (
    cust_no varchar2(6) primary key,
    prod_no varchar2(6),
    no_of_items_purchased number(3),
    total_price number(15,4),
    discount number(4),
    netamount number(10,4)
    );

Insert Query:

insert into cust_prod_t5 values('001','0001','50','5000','2','10000');
insert into cust_prod_t5 values('002','0002','30','3000','3','9000');
insert into cust_prod_t5 values('003','0003','50','5000','2','10000');
insert into cust_prod_t5 values('004','0004','60','15000','12','20000');
insert into cust_prod_t5 values('005','0005','10','12000','8','15000');

Select Query:

 select * from cust_prod_t5;

Output:

CUST_N PROD_N NO_OF_ITEMS_PURCHASED TOTAL_PRICE   DISCOUNT  NETAMOUNT
------ ------ --------------------- ----------- ---------- ----------
001    0001                      50        5000          2       10000
002    0002                      30        3000          3       9000
003    0003                      50        5000          2       10000
004    0004                      60       15000         12     20000
005    0005                      10       12000          8      15000

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA