Page 291 - Information_Practice_Fliipbook_Class11
P. 291
(iii) To display the records of all Sports watches.
(iv) To display the names of all brands, without repetition.
(v) To display the count of designer watches.
(vi) To display the count of watches of each brand.
(vii) To display the name and brand of watches that have been purchased in the year 2020.
Assessment
A. Multiple Choice questions
1. Which of the following is a DDL command?
a. ALTER b. DELETE c. UPDATE d. SELECT
2. In MySQL, what is the default order for the ORDER BY clause to sort the records?
a. Descending b. Ascending
c. There is no ORDER BY clause in MySQL d. Both a and b
3. Which of the following is a DML command?
a. DELETE b. ALTER c. CREATE TABLE d. ORDER BY
4. Which of the following is a valid integer value that can be stored in a MySQL table?
a. 12,345 b. 123-45
c. 12345 d. Twelve thousand three hundred and forty-five
5. Which of the following is the default DATE format in MySQL?
a. yyyy-mm-dd b. dd-mm-yyyy c. dd/mm/yyyy d. yyyy/mm/dd
6. Which of the following constraints is used to restrict the values that an attribute can take?
a. DEFAULT b. CHECK c. DISTINCT d. WHERE
7. Which of the following commands will remove the entire table from the MySQL database?
a. DELETE TABLE b. DROP TABLE c. REMOVE TABLE d. CLEAR TABLE
8. Which of the following SQL statements will display all tables in a database?
a. SHOW ALL TABLES b. SHOW TABLES
c. SELECT * FROM DATABASE d. DESCRIBE TABLES
9. Consider a table PICNIC. Which of the following statements will not generate any error?
a. ALTER TABLE PICNIC SET PAX=5 b. UPDATE TABLE PICNIC MODIFY VENUE="JAIPUR"
c. DROP FROM TABLE PICNIC d. DELETE FROM PICNIC
10. Which of the following is not a valid key in MySQL?
a. Primary Key b. Foreign Key c. Alternate Key d. Secondary Key
11. Which of the following DML statements is used to retrieve records from a database?
a. QUERY b. SELECT c. INSERT d. RETRIEVE
12. Which of the following functions is used to display the total number of records from a table?
a. TOTAL() b. SUM() c. COUNT(*) d. COUNTRECORDS()
13. Which of the following keywords is used, along with ALTER TABLE command to delete an attribute from a table?
a. DROP b. REMOVE c. DELETE d. DEL
14. Which of the following is NOT a valid operator and so cannot be used in SQL queries?
a. IN b. IS c. LIKE d. SAME AS
15. Which of the following wild card characters are used with the LIKE operator to define a pattern of records to be retrieved?
a. % and ? b. _ (underscore) and % c. _ (unserdcore) and ? d. % and #
Database Concepts and the Structured Query Language 277

