GATE | GATE MOCK 2017 | Question 60
Which option is true about the SQL query given below?
SELECT firstName, lastName FROM Employee WHERE lastName BETWEEN 'A%' AND 'D%';
(A) It will display all the employees having last names starting with the alphabets ‘A’ till ‘D’ inclusive of A and exclusive of D.
(B) It will throw an error as BETWEEN can only be used for Numbers and not strings.
(C) It will display all the employees having last names starting from ‘A’ and ending with ‘D’.
(D) It will display all the employees having last names in the range of starting alphabets as ‘A’ and ‘D’ excluding the names starting with ‘A’ and ‘D’.
Answer: (A)
Explanation:
The BETWEEN operator works with the range of character values also.
Quiz of this Question
Recommended Posts:
- GATE | GATE MOCK 2017 | Question 21
- GATE | GATE MOCK 2017 | Question 31
- GATE | GATE MOCK 2017 | Question 32
- GATE | GATE MOCK 2017 | Question 33
- GATE | GATE MOCK 2017 | Question 34
- GATE | GATE MOCK 2017 | Question 35
- GATE | GATE MOCK 2017 | Question 36
- GATE | GATE MOCK 2017 | Question 37
- GATE | GATE MOCK 2017 | Question 38
- GATE | GATE MOCK 2017 | Question 30
- GATE | GATE MOCK 2017 | Question 29
- GATE | GATE MOCK 2017 | Question 27
- GATE | GATE MOCK 2017 | Question 22
- GATE | GATE MOCK 2017 | Question 23
- GATE | GATE MOCK 2017 | Question 24



