Which of the following SELECT statements are valid?

Consider the friends table is given by the following information:

mysql> SELECT * FROM friends;

Which of the following SELECT statements are valid?

Consider the friends table is given by the following information:

mysql> SELECT * FROM friends;

Which of the following SELECT statements are valid?

A.
SELECT firstname FROM friends

B.
SELECT lastname, age, 1 FROM friends

C.
SELECT ‘age’

D.
SELECT ‘age’ WHERE ‘age’ > 30



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Shahriyar Rzayev

Shahriyar Rzayev

Hi,
Why you put clause C as correct answer?
select ‘age’ is not valid due to table shown above.
But by itself ofcourse select ‘age’ is valid statement.
[code]
mysql> select ‘age’;
+—–+
| age |
+—–+
| age |
+—–+
1 row in set (0.00 sec)

[/code]

Siwei

Siwei

Hi Shahriyar,
The question is about which query is valid, which has nothing to do with the table provided in the topic. In this case, option C will not return an error, therefore it’s valid.