This set of SQL Multiple Choice Questions & Answers (MCQs) focuses on “SQL Syntax”.
1. SQL keywords are case sensitive.
a) True
b) False
View Answer
Explanation: SQL keywords are NOT case sensitive.
“SELECT * FROM table_name;” is same as “select * from table_name;”. Both upper and lower case letters can be used in SQL.
2. Which character is used to separate SQL statements in database systems?
a) :
b) ;
c) _
d) %
View Answer
Explanation: A SQL statement begins with a SQL keyword and ends with a semicolon. Using semicolon is the standard way to separate each SQL statement in database systems.
3. Which of the following SQL command(s) retrieves information from a Database?
a) Update
b) Extract
c) Select
d) Retrieve
View Answer
Explanation: Update modifies the data which exists in a database. Select retrieves data from a database. Extract and Retrieve are not valid SQL commands.
4. Using which command one can delete existing data from database without deleting the table?
a) Drop
b) Delete
c) Remove
d) Collapse
View Answer
Explanation: Drop deletes a table. Delete command is used to delete data from a database without deleting the table. Remove and Collapse are not SQL commands.
5. Which SQL command is used to modify data in a Database?
a) Modify
b) Change
c) Save
d) Update
View Answer
Explanation: Update command updates data in a database. Modify, Change and Save are not valid SQL commands.
6. To insert new data into a database, which of the following SQL command is used?
a) Insert
b) Insert Into
c) Update
d) Add New
View Answer
Explanation: Insert Into is used to insert new data into a database. Update modifies the existing data in a Database, whereas the rest are not SQL statements.
7. Which command is used to eliminate a table from a database?
a) Drop
b) Delete
c) Remove
d) Eliminate
View Answer
Explanation: Drop deletes a table. Delete command deletes the contents of a table. Remove and Eliminate are not valid SQL commands.
8. Which of the following is used to modify an existing table?
a) Alter
b) Alter Table
c) Modify
d) Update
View Answer
Explanation: Alter Table is used to modify an existing table. Update modifies data of a table. Modify and Alter is not SQL commands.
9. To create a new table, which of the following command is used?
a) Create
b) Create New
c) Create Table
d) Create New Table
View Answer
Explanation: Create Table creates a new table in the database, whereas the rest are not SQL commands.
10. Which of the following is a valid SQL command for an Index?
a) Create Index
b) Change Index
c) Add Index
d) Remove Index
View Answer
Explanation: Create Index is used to create a relational Index on a database table, whereas the rest are not valid SQL commands.
Sanfoundry Global Education & Learning Series – SQL.
To practice all areas of SQL, here is complete set of 1000+ Multiple Choice Questions and Answers.