sql11

docx

School

Centennial College *

*We aren’t endorsed by this school

Course

004

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

6

Uploaded by yam1231

Report
Certainly! Here are some multiple-choice questions (MCQs) related to SQL (Structured Query Language). Each question has four options, and the correct answer is indicated. **Question 1:** Which SQL keyword is used to retrieve data from one or more database tables? a) FETCH b) SELECT c) RETRIEVE d) GET **Answer:** b) SELECT --- **Question 2:** What does the SQL acronym "DDL" stand for? a) Data Definition Language b) Data Description Language c) Database Design Language d) Data Division Language
**Answer:** a) Data Definition Language --- **Question 3:** Which SQL clause is used to filter the results of a SELECT statement based on a specified condition? a) ORDER BY b) GROUP BY c) HAVING d) WHERE **Answer:** d) WHERE --- **Question 4:** What is the purpose of the SQL GROUP BY clause? a) To sort the result set in ascending order b) To filter the result set based on a condition c) To group rows that have the same values in specified columns d) To join two or more tables
**Answer:** c) To group rows that have the same values in specified columns --- **Question 5:** Which SQL statement is used to add new rows of data to a table? a) INSERT INTO b) ADD ROW c) UPDATE d) ADD RECORD **Answer:** a) INSERT INTO --- **Question 6:** In SQL, what is the purpose of the JOIN clause? a) To filter rows based on a condition b) To combine rows from two or more tables based on a related column c) To perform mathematical operations on numeric columns
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
d) To remove duplicate rows from a result set **Answer:** b) To combine rows from two or more tables based on a related column --- **Question 7:** Which SQL function is used to find the total number of rows in a table? a) TOTAL() b) COUNT() c) SUM() d) AVG() **Answer:** b) COUNT() --- **Question 8:** What is the purpose of the SQL ORDER BY clause? a) To filter the result set based on a condition b) To group rows that have the same values in specified columns c) To sort the result set based on one or more columns
d) To perform calculations on numeric columns **Answer:** c) To sort the result set based on one or more columns --- **Question 9:** Which SQL statement is used to make changes to existing data in a table? a) ALTER b) MODIFY c) UPDATE d) CHANGE **Answer:** c) UPDATE --- **Question 10:** What is the purpose of the SQL DELETE statement? a) To remove a table from the database b) To remove all data from a table
c) To remove specific rows from a table based on a condition d) To delete a database **Answer:** c) To remove specific rows from a table based on a condition
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help