250+ TOP MCQs on The select Clauses and Answers

MySQL Multiple Choice Questions on “The select Clauses”.

1. What is the meaning of “SELECT” clause in Mysql?
a) Show me all Columns and rows
b) Show me all columns
c) Show me all rows
d) None of the mentioned

Answer: a
Clarification: None.

2. Which of the following clause is evaluated in the last by database server?
a) SELECT
b) WHERE
c) FROM
d) None of the mentioned

Answer: a
Clarification: “SELECT” clause is used to show all rows or columns therefore it evaluated at last.

3. What will be the output of the following SQL statement?

a) Show all rows and columns of table “person”
b) Show all rows of table “person”
c) Show all columns of table “person”
d) None of the mentioned

Answer:a
Clarification: “SELECT” clause is used to show all rows or columns.

4. What will be the output of of the following SQL statement?

SELECT person_id, Fname, lname
FROM person;

a) Show only columns (person_id, Fname, lname) and rows related to these columns
b) Show only columns (person_id, Fname, lname)
c) Show all rows
d) Show all columns except (person_id, Fname, lname)

Answer: a
Clarification: “SELECT” clause is used to show all rows and columns that are mention with the query.

5. Can “SELECT” clause be used without the clause “FROM”?
a) YES
b) NO
c) DEPENDS
d) None of the mentioned

Answer: b
Clarification: “SELECT” clause is used to show rows and columns of a particular table and clause “from” is used to denote a table name.

6. Find the error in the following SQL statement?

  250+ TOP MCQs on PHP Overview and Answers

a) No Error
b) No table mentioned
c) Depends
d) None of the mentioned

Answer: b
Clarification: “SELECT” clause cannot be used without clause “FROM”.

7. What will be the output of the following SQL statement?

SELECT  * FROM person
WHERE person_id=1;

a) Show all columns but only those rows which belongs to person_id=1
b) Show all columns and rows
c) Shows only columns person_id
d) None of the mentioned

Answer: a
Clarification: Clause “WHERE” is also used, which tells the compiler to show only that rows which belong to person_id=1.

8. What will be the output of the following SQL statement?

SELECT person_id, fname, lname
FROM person
WHERE person_id=1;

a) Show only columns(person_id, fname, lname) but only those rows which belongs to person_id=1
b) Show all columns and rows
c) Shows only columns person_id
d) None of the mentioned

Answer: a
Clarification: Clause “WHERE” is also used, which tells the compiler to show only that rows which are belong to person_id=1.

9. Which clause is mandatory with clause “SELECT” in Mysql?
a) FROM
b) WHERE
c) Both FROM and WHERE
d) None of the mentioned

Answer: a
Clarification: “SELECT” clause cannot be used without clause “FROM”.

Leave a Comment

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

Scroll to Top