MySQL Multiple Choice Questions on “The from Clauses”.
1. How can we define the clause “FROM” in Mysql?
a) It defines the tables used by a query
b) It defines the linking of tables in Mysql
c) It defines the tables used by a query & linking of tables in Mysql
d) None of the mentioned
Answer: c
Clarification: None.
2. Which of the following table exist in Mysql?
a) Permanent Tables
b) Virtual tables
c) Temporary tables
d) All of the mentioned
Answer: d
Clarification: Depends on the query.
3. “CREATE TABLE …” command is used to create which type of table in Mysql?
a) Permanent Tables
b) Virtual tables
c) Temporary tables
d) All of the mentioned
Answer: a
Clarification: CREATE table is used to create permanent tables in database.
4. “CREATE VIEW …” command is used to create which type of table in Mysql?
a) Permanent Tables
b) Virtual tables
c) Temporary tables
d) All of the mentioned
Answer: b
Clarification: CREATE VIEW is used to create virtual tables.
5. What is the meaning of “Temporary Tables” in Mysql?
a) Rows returned by sub query
b) Permanent tables
c) Virtual tables
d) All of the mentioned
Answer: a
Clarification: “Temporary Tables” are output format of any query on Mysql.
6. “SELECT” clause cannot be used without which clause in Mysql?
a) FROM
b) WHERE
c) ORDER BY
d) All of the mentioned
Answer: a
Clarification: “FROM” clause is necessary to point out tables in the database.
7. Which of the following statements is/are correct with respect to “VIEW”?
a) “VIEW” is a query that stored in the data dictionary
b) There is no data associated with “VIEW”
c) “VIEW” creates virtual tables in Database
d) All of the mentioned
Answer: d
Clarification: None.
8. Find the missing clause from the following SQL statement?
CREATE VIEW person_1 AS SELECT fname, lname, person_id _________person;
a) FROM
b) WHERE
c) SELECT
d) None of the mentioned
Answer: a
Clarification: “CREATE VIEW” cannot be used without “FROM” clause.
9. In the following MySQL query, “person_1” belongs to which category of table in MySQL?
CREATE VIEW person_1 AS SELECT fname, lname, person_id FROM person;
a) Permanent Tables
b) Virtual tables
c) Temporary tables
d) None of the mentioned
Answer: b
Clarification: “CREATE VIEW” creates “Virtual tables” only.
10. Which command is used to create “Temporary tables” in MySQL?
a) CREATE TABLE;
b) CREATE VIEW
c) Both CREATE TABLE; and CREATE VIEW
d) None of the mentioned
Answer: d
Clarification: “Temporary Tables” are output format of any query.
