1Z0-061 · Question #293
Examine the structure of the TRANSACTIONS table: Name Null Type TRANS_ID NOT NULL NUMBER(3) CUST_NAME VARCHAR2(30) TRANS_DATE DATE TRANS_AMT NUMBER(10, 2) You want to display the transaction date…
The correct answer is C. Only the first query gives the correct result. Range Conditions Using the BETWEEN Operator Use the BETWEEN operator to display rows based on a range of values: SELECT last_name, salary WHERE salary BETWEEN 2500 AND 3500; Range Conditions Using the BETWEEN Operator You can display rows based on a range of values using the…
Question
Examine the structure of the TRANSACTIONS table:
Name Null Type TRANS_ID NOT NULL NUMBER(3) CUST_NAME VARCHAR2(30) TRANS_DATE DATE TRANS_AMT NUMBER(10, 2) You want to display the transaction date and specify whether it is a weekday or weekend. Evaluate the following two queries:
Which statement is true regarding the above queries?
Exhibit
Options
- ABoth give wrong results.
- BBoth give the correct result.
- COnly the first query gives the correct result.
- DOnly the second query gives the correct result.
How the community answered
(45 responses)- A9% (4)
- B13% (6)
- C73% (33)
- D4% (2)
Explanation
Range Conditions Using the BETWEEN Operator Use the BETWEEN operator to display rows based on a range of values: SELECT last_name, salary WHERE salary BETWEEN 2500 AND 3500; Range Conditions Using the BETWEEN Operator You can display rows based on a range of values using the BETWEEN operator. The range that you specify contains a lower limit and an upper limit. The SELECT statement in the slide returns rows from the EMPLOYEES table for any employee whose salary is between $2, 500 and $3, 500. Values that are specified with the BETWEEN operator are inclusive. However, you must specify the lower limit first. You can also use the BETWEEN operator on character values: SELECT last_name WHERE last_name BETWEEN 'King' AND 'Smith';
Topics
Community Discussion
No community discussion yet for this question.
