5. Display full details from the ORDER_LINE table where the
item number is (first condition) between 1 and 200 (no > or
< operators) OR the item number is greater than 1000 AND
(second condition) the item cost is not in the list 1000,
2000, 3000 OR the order number is not equal to 1000.
Answers were Sorted based on User's Feedback
select *
from order_line
where item_number between 1 and 200
or item_number > 1000
intersect
select *
from order_line
where order_number not in (1000,2000,3000)
or order_number <> 1000
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / murali
select * from order_line where
itemnum between 1 and 200 or itemnum>100
and
cost not in (1000,2000,3000) or ordernum<>1000
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / suman rana
select * from order_line
where ( (itemnum between 1 and 200) or itemnum >100)
and not (cost in (1000,2000,3000) or ordernum = 1000)
| Is This Answer Correct ? | 0 Yes | 0 No |
What is open database communication (odbc) in oracle?
What are the most common interview questions on ETL Testing for experience?
What is difference between UNIQUE constraint and PRIMARY KEY constraint ?
What are the different types of synonyms?
What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ?
Find all employees in Dept “Marketing”.
Differentiate between pre-select and pre-query?
How to loop through a cursor variable?
Can a Tablespace hold objects from different Schemes ?
How to Remove the 3rd highest salary person record from table?
How to revoke create session privilege from a user in oracle?
What happens if the update subquery returns multiple rows?