MCQ | SQL – Basics (Set 2)

SQL Basics MCQ: This section contains the Multiple-Choice Questions & Answers on SQL Basics (Set 2).
Submitted by Anushree Goswami, on August 16, 2021

SQL Basics MCQs (Set 2)

1. Syntax of the Structured Query Language is ____?

  1. Case-sensitive
  2. Not case-sensitive

Answer: B) Not case-sensitive

Explanation:

Syntax of the Structured Query Language is not case-sensitive.

Discuss this Question


2. Which of the following statement is false?

  1. There is no difference between a lower case and upper case keyword in SQL.
  2. It is easier to read SQL queries when the keywords are in lowercase.
  3. An SQL statement's syntax is determined by its text line.
  4. One or more SQL statements can be placed on a single line of text.

Answer: B) It is easier to read SQL queries when the keywords are in lowercase

Explanation:

It is easier to read SQL queries when the keywords are in uppercase.

Discuss this Question


3. Which of the following statement is true?

  1. SQL statements are used for most operations in a database.
  2. Relational algebra and tuple relationship calculus are needed for SQL syntax.
  3. All of the above
  4. None of the above

Answer: C) All of the above

Explanation:

SQL statements are used for most operations in a database and Relational algebra and tuple relationship calculus are needed for SQL syntax.

Discuss this Question


4. Which of the following is not an SQL Statement?

  1. SELECT Statement
  2. UPDATE Statement
  3. TRUNCATE TABLE Statement
  4. FROM Statement

Answer: D) FROM Statement

Explanation:

SQL Statements are SELECT, UPDATE, TRUNCATE TABLE.

Discuss this Question


5. What does the SELECT Statement do?

  1. Data is read from the SQL database by this statement and displayed to the database user.
  2. The stored data in the SQL database is changed or modified by this SQL statement.
  3. By deleting the stored data, this SQL statement deletes the database.
  4. A new table in SQL is created using this SQL statement.

Answer: A) Data is read from the SQL database by this statement and displayed to the database user

Explanation:

Using SELECT Statement, Data is read from the SQL database and displayed to the database user.

Discuss this Question


6. What does the UPDATE Statement do?

  1. By deleting the stored data, this SQL statement deletes the database.
  2. A new table in SQL is created using this SQL statement.
  3. The stored data in the SQL database is changed or modified by this SQL statement.
  4. Columns in the SQL database can be created, deleted, or modified with this SQL statement.

Answer: C) The stored data in the SQL database is changed or modified by this SQL statement

Explanation:

The stored data in the SQL database is changed or modified by UPDATE SQL statement.

Discuss this Question


7. What does the DELETE Statement do?

  1. A new table in SQL is created using this SQL statement.
  2. By deleting the stored data, this SQL statement deletes the database.
  3. Columns in the SQL database can be created, deleted, or modified with this SQL statement.
  4. By executing this SQL statement, you remove the table and all the information that it contains, including the structure, views, permissions, and triggers.

Answer: B) By deleting the stored data, this SQL statement deletes the database

Explanation:

By deleting the stored data, DELETE SQL statement deletes the database.

Discuss this Question


8. What does the CREATE TABLE Statement do?

  1. The stored data in the SQL database is changed or modified by this SQL statement.
  2. By deleting the stored data, this SQL statement deletes the database.
  3. A new table in SQL is created using this SQL statement.
  4. Columns in the SQL database can be created, deleted, or modified with this SQL statement.

Answer: C) A new table in SQL is created using this SQL statement

Explanation:

A new table in SQL is created using CREATE TABLE SQL statement.

Discuss this Question


9. What does the ALTER TABLE Statement do?

  1. By deleting the stored data, this SQL statement deletes the database.
  2. Columns in the SQL database can be created, deleted, or modified with this SQL statement.
  3. A new table in SQL is created using this SQL statement.
  4. The table, its structure, views, permissions, and triggers will also be deleted or removed with this SQL statement.

Answer: B) Columns in the SQL database can be created, deleted, or modified with this SQL statement

Explanation:

Columns in the SQL database can be created, deleted, or modified with ALTER TABLE SQL statement.

Discuss this Question


10. What does the DROP TABLE Statement do?

  1. The table, its structure, views, permissions, and triggers will also be deleted or removed with this SQL statement.
  2. A new table in SQL is created using this SQL statement.
  3. Columns in the SQL database can be created, deleted, or modified with this SQL statement.
  4. A new database will be created through this SQL statement.

Answer: A) The table, its structure, views, permissions, and triggers will also be deleted or removed with this SQL statement

Explanation:

The table, its structure, views, permissions, and triggers will also be deleted or removed with DROP TABLE SQL statement.

Discuss this Question


11. What does the CREATE DATABASE Statement do?

  1. Columns in the SQL database can be created, deleted, or modified with this SQL statement.
  2. The table, its structure, views, permissions, and triggers will also be deleted or removed with this SQL statement.
  3. In the database management system, this SQL statement deletes the existing database, together with all the database tables and views.
  4. A new database will be created through this SQL statement.

Answer: D) A new database will be created through this SQL statement

Explanation:

A new database will be created through CREATE DATABASE SQL statement.

Discuss this Question


12. What does the DROP DATABASE Statement do?

  1. The table, its structure, views, permissions, and triggers will also be deleted or removed with this SQL statement.
  2. In the database management system, this SQL statement deletes the existing database, together with all the database tables and views.
  3. A new database will be created through this SQL statement.
  4. In this SQL statement, the data or records are inserted into an existing database table. One query statement can insert multiple records simultaneously using this statement.

Answer: B) In the database management system, this SQL statement deletes the existing database, together with all the database tables and views

Explanation:

In the database management system, DROP DATABASE SQL statement deletes the existing database, together with all the database tables and views.

Discuss this Question


13. What does the INSERT INTO Statement do?

  1. In this SQL statement, the data or records are inserted into an existing database table. One query statement can insert multiple records simultaneously using this statement.
  2. A new database will be created through this SQL statement.
  3. In the database management system, this SQL statement deletes the existing database, together with all the database tables and views.
  4. By executing this SQL statement, all records in the SQL database will be deleted.

Answer: A) In this SQL statement, the data or records are inserted into an existing database table. One query statement can insert multiple records simultaneously using this statement

Explanation:

In INSERT INTO SQL statement, the data or records are inserted into an existing database table. One query statement can insert multiple records simultaneously using this statement.

Discuss this Question


14. What does the TRUNCATE TABLE Statement do?

  1. In the database management system, this SQL statement deletes the existing database, together with all the database tables and views.
  2. In this SQL statement, the data or records are inserted into an existing database table. One query statement can insert multiple records simultaneously using this statement.
  3. By executing this SQL statement, all records in the SQL database will be deleted.
  4. The data specified in this table or view is reported in this SQL statement.

Answer: C) By executing this SQL statement, all records in the SQL database will be deleted

Explanation:

By executing TRUNCATE TABLE SQL statement, all records in the SQL database will be deleted.

Discuss this Question


15. What does the DESCRIBE Statement do?

  1. In this SQL statement, the data or records are inserted into an existing database table. One query statement can insert multiple records simultaneously using this statement.
  2. By executing this SQL statement, all records in the SQL database will be deleted.
  3. Specify the columns of the table in this SQL statement to return distinct values.
  4. The data specified in this table or view is reported in this SQL statement.

Answer: D) The data specified in this table or view is reported in this SQL statement

Explanation:

The data specified in this table or view is reported in DESCRIBE SQL statement.

Discuss this Question


16. What does the DISTINCT Clause do?

  1. Specify the columns of the table in this SQL clause to return distinct values.
  2. By executing this SQL statement, all records in the SQL database will be deleted.
  3. The data specified in this table or view is reported in this SQL statement.
  4. Changes made in the SQL database transaction are permanently saved using this SQL statement.

Answer: A) Specify the columns of the table in this SQL clause to return distinct values

Explanation:

Specify the columns of the table in DISTINCT SQL clause to return distinct values.

Discuss this Question


17. What does the COMMIT Statement do?

  1. The data specified in this table or view is reported in this SQL statement.
  2. Changes made in the SQL database transaction are permanently saved using this SQL statement.
  3. Specify the columns of the table in this SQL statement to return distinct values.
  4. By running this SQL statement, the transaction will be undone and the operations not yet saved to the SQL database will be undone.

Answer: B) Changes made in the SQL database transaction are permanently saved using this SQL statement

Explanation:

Changes made in the SQL database transaction are permanently saved using COMMIT SQL statement.

Discuss this Question


18. What does the ROLLBACK Statement do?

  1. Specify the columns of the table in this SQL statement to return distinct values.
  2. Changes made in the SQL database transaction are permanently saved using this SQL statement.
  3. By running this SQL statement, the transaction will be undone and the operations not yet saved to the SQL database will be undone.
  4. An index is created in a SQL database table with this SQL statement.

Answer: C) By running this SQL statement, the transaction will be undone and the operations not yet saved to the SQL database will be undone

Explanation:

By running ROLLBACK SQL statement, the transaction will be undone and the operations not yet saved to the SQL database will be undone.

Discuss this Question


19. What does the CREATE INDEX Statement do?

  1. An index is created in a SQL database table with this SQL statement.
  2. Changes made in the SQL database transaction are permanently saved using this SQL statement.
  3. By running this SQL statement, the transaction will be undone and the operations not yet saved to the SQL database will be undone.
  4. The SQL database table's index is deleted using this SQL statement.

Answer: A) An index is created in a SQL database table with this SQL statement

Explanation:

An index is created in a SQL database table with CREATE INDEX SQL statement.

Discuss this Question


20. What does the DROP INDEX Statement do?

  1. By running this SQL statement, the transaction will be undone and the operations not yet saved to the SQL database will be undone.
  2. The SQL database table's index is deleted using this SQL statement.
  3. An index is created in a SQL database table with this SQL statement.
  4. An existing SQL database is selected with this SQL statement. A database must be selected from several existing databases before you can perform operations on the table.

Answer: B) The SQL database table's index is deleted using this SQL statement

Explanation:

The SQL database table's index is deleted using DROP INDEX SQL statement.

Discuss this Question





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.