2. Display the item number and total cost for each order
line (total cost = no of items X item cost). Name the
calculated column TOTAL COST.
Answers were Sorted based on User's Feedback
Answer / girija.112
ANS:
SELECT ITEM_NO , NO_OF_ITEMS*INDIVIDUAL_ITEM_COST AS "TOTAL COST"
FROM ITEM_TABLE
ITEM_NO TOTAL COST
1001 30000
1002 40000
1003 72000
1004 100000
1006 40000
1007 60000
1008 80000
1009 -
1010 56000
I have assumed that ITEM_NO, NO_OF_ITEMS &
INDIVIDUAL_ITEM_COST columns are in a single table ITEM_TABLE
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ajit
select itemnum,totalcost
from <tab name>
group by cube(itemnum, totalcost);
| Is This Answer Correct ? | 0 Yes | 0 No |
Use of an integrity constraint is better to validate data. Explain
while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511
10. Display the client number, order date and shipping date for all orders where the shipping date is between three and six months after the order date.
how to find the n'th highest salary from emp ?
State all possible different index configurations a table can possibly have?
Which is better Oracle or MS SQL? Why?
How to define an explicit cursor in oracle?
What is tns name?
How to change program global area (pga) in oracle?
How do I limit the number of rows returned by an oracle query after ordering?
What is the usage of control file in oracle?
Create table Employee ( Employee_Id varchar2(8) Constraint emp_id_pk primary key, FirstName varchar2(50), LastName varchar2(50), DeptID Number(5) Constraint dept_id_fk Foreign Key(DeptId) References Department(DeptId) ) Error I am getting: Constraint specification are not allowed here