sql13

docx

School

Centennial College *

*We aren’t endorsed by this school

Course

004

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

3

Uploaded by yam1231

Report
Certainly! Here are some multiple-choice questions (MCQs) related to SQL (Structured Query Language): 1. **What does SQL stand for?** - A) Structured Query Language - B) Simple Question Language - C) Sequential Query Language - D) Server Query Language 2. **Which of the following is used to retrieve data from a database?** - A) SELECT - B) UPDATE - C) DELETE - D) INSERT 3. **What is the purpose of the WHERE clause in an SQL statement?** - A) To specify the columns to be retrieved - B) To filter the rows that meet a specified condition - C) To order the result set - D) To join multiple tables 4. **Which SQL keyword is used to sort the result set in ascending order?** - A) ASC - B) DESC - C) ORDER BY - D) SORT 5. **What is the role of the GROUP BY clause in SQL?** - A) To filter rows based on a condition - B) To sort the result set
- C) To group rows that have the same values in specified columns - D) To join tables 6. **In SQL, which data type is used to store a date and time?** - A) INT - B) DATE - C) VARCHAR - D) FLOAT 7. **Which SQL statement is used to add new rows to a table?** - A) ADD - B) INSERT INTO - C) UPDATE - D) ALTER TABLE 8. **What is the purpose of the HAVING clause in SQL?** - A) To filter rows based on a condition - B) To specify the columns to be retrieved - C) To filter the result set after grouping - D) To order the result set 9. **Which SQL command is used to remove a table from the database?** - A) DELETE TABLE - B) DROP TABLE - C) REMOVE TABLE - D) ERASE TABLE 10. **What is the primary key in a relational database used for?** - A) To establish relationships between tables
- B) To uniquely identify a record in a table - C) To store large amounts of text data - D) To sort the result set Answers: 1. A) Structured Query Language 2. A) SELECT 3. B) To filter the rows that meet a specified condition 4. A) ASC 5. C) To group rows that have the same values in specified columns 6. B) DATE 7. B) INSERT INTO 8. C) To filter the result set after grouping 9. B) DROP TABLE 10. B) To uniquely identify a record in a table
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