Class 12 Computer Science Chapter 4 Structured Query Language (Sql) Quiz 3 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. The UPDATE SQL clause can .....
2. Pilih arahan SQL yang digunakan untuk memasukkan data ke dalam jadual SQL?
3. Your friend accidentally runsDROP TABLE users;instead ofCREATE TABLE users;.What happens?
4. TRUE OR FALSE:when inserting data into a table you must specify field names
5. If you were wanting to filter data, which clause would you use?
6. A relation may have multiple foreign keys.
7. What does the ALTER TABLE clause do?
8. You're creating a table for a pizza delivery app. Which CHECK constraint makes the least sense?
9. In SQL, the truth value of (FALSE OR NULL) is .....
10. What does the SQL statement 'SELECT name, population FROM world WHERE name LIKE 'A%' OR name LIKE 'B%" do?
11. When editing columns in a pre-existing table, which command allows you to change the data type of a column?
12. What MySQL keyword is added to primary keys in a CREATE TABLE statement to indicate that the database is to provide a value for the column when records are inserted.
13. Which word is missing from the following SQL statement?Select * table ..... name
14. Identify if there is an error in the SQL statement below in deleting a record:DELETE FROM Employee ..... details WHERE Employee ..... details.ID = 10;
15. Which of the following indexes would be best for fast look up for exact key matches but not so good for prefix lookups or sorting?
16. What is wrong with the following code:SELECT * FROM movies WHERE genre = comedy AND year < 2016 ORDER BY year DESC;
17. ..... Keyword is used with special pattern in the expression to search for a matching string in the character field.
18. Identify if there is an error in the SQL UPDATE statement below:UPDATE Employee ..... details SET Employee ..... details.Lastname = 'THANTRA', Employee ..... details.Salary = '3600' WHERE Employee ..... details.ID =8;
19. Which command is used to change the data type of a field in a table?
20. Which symbol would you use to represent more than 50
21. Using which word allows you to specify that only one of a series of conditions needs to be met in a query filter?
22. SELECT MAX(price)FROM PRODUCTwill return how many rows?
23. Which statement is the right syntax to make a new database using command line?
24. Which SQL statement would add a record to the database?
25. A primary key can be NULL in the table? TRUE or FALSE