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 |
How to export your connection information to a file?
What is the usage of synonyms?
How to create a single index for multiple columns?
What is an Oracle index?
What view(s) do you use to associate a users SQLPLUS session with his o/s process?
i have a table with 1 lac of data.i want to insert this data into another table. i want every 5000 of data insert use a commit.using counter and if error is comming in the 5000 of data it rollback.
How to find 1st, 2nd, 3rd highest using select select statement not using rownum
What are the trigger associated with image items ?
How to write date and time interval literals in oracle?
How to remove a row in a database table?
i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?
How to create lov dynamically at runtime & attach to text field?