1,947 views
1 votes
1 votes

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

since between is inclusive shouldn't D also to be included

1 Answer

Best answer
4 votes
4 votes
String should start with any letter beween A and D inclusive of A and exclusive of strings starting with D but if D is itself a string it will be selected

None of the answer is correct but (A) seems the closest one.
selected by

Related questions

1 votes
1 votes
0 answers
4