Class 12 Computer Science Chapter 4 Structured Query Language (Sql) Quiz 2 (60 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is wrong with the following code:SELECT * FROM movies WHERE genre = comedy AND year < 2016 ORDER BY year DESC;
2. ..... Keyword is used with special pattern in the expression to search for a matching string in the character field.
3. 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;
4. Which command is used to change the data type of a field in a table?
5. Using which word allows you to specify that only one of a series of conditions needs to be met in a query filter?
6. SELECT MAX(price)FROM PRODUCTwill return how many rows?
7. Which statement is the right syntax to make a new database using command line?
8. Which SQL statement would add a record to the database?
9. A primary key can be NULL in the table? TRUE or FALSE
10. What does the SQL statement 'DELETE FROM world WHERE population > 10000000' do?
11. What is a record (row) in a database table?
12. What is a special value in SQL that represents missing or unknown data?
13. Pernyataan (a) ..... dalam SQL digunakan untuk membina jadual daripada pangkalan data, manakala pernyataan (b) ..... dalam SQL digunakan untuk menghapuskan jadual daripada pangkalan data.
14. SQL query to find the temperature in increasing order of all cities.
15. WHICH QUERY?defines the list of search criteria
16. The ..... consists of commands used to query or retrieve data from a database.
17. What is the main purpose of a relational database?
18. Which command is used to add a new field to an existing table in SQL?
19. Which SQL command is used to select specific data from a table?
20. What does a NULL value represent in SQL?
21. Select SQL command to insert values in COURSE table.
22. Which of the following scripts will run successfully?
23. "INSERT INTO" is the keyword used to insert data into tables.
24. What can you do with SQL besides the commands mentioned?
25. What is missing in this code? SELECT * FROM WHERE genre = 'action' ORDER BY year ASC;
26. What is the SQL keyword that reconnects rows with foreign keys with the corresponding data in the table that the foreign key points to?
27. What does the SQL command 'SELECT *' do?
28. SQL is a ..... language designed for the retrieval and management of relational database.
29. What is the purpose of the 'like' keyword in SQL?
30. Where does the CREATE Command belong?
31. The command to remove rows from a table 'CUSTOMER' is .....
32. What is the purpose of the 'update' command in SQL?
33. The LIMIT clause reduces the number of rows returned by a query.
34. Differentiate between DELETE and DROP command.
35. .... Command withdraws the access permission given by the GRANT statement
36. In order to modify data in a database we would use which SQL statement?
37. A column in a database
38. The HAVING clause includes a predicate used to filter rows resulting from the ..... clause
39. What does a declarative language mean in the context of SQL?
40. ANSI stands for .....
41. A primary key can be set to null.
42. ..... command restores the database to last commit state
43. Which SQL function is used to count the number of rows in a SQL query?
44. What word is missing from the line below?SELECT * ..... CUSTOMER;
45. List the Data Definition Language (DDL) command.
46. What is the purpose of *?
47. Values of ..... type is enclosed in single quotes.
48. .... are instructions given by the user to the database also known as statements.
49. Return only the customers who have ER anywhere in their last name.
50. Which keyword is used to add conditions to your query?
51. What represents no value?
52. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" ends with an "a" ?
53. WHICH QUERY?defines the list of tables the data will come from
54. You're creating a table for a movie database.Which column should be a foreign key?
55. What does the SQL statement 'INSERT INTO world (name, capital, population) VALUES ('Ours', 'Emerald City', 1000000)' do?
56. Write a code for the following:Return the names and imdb ..... ratings of all movies with 'day' in the name.
57. What is the command used to delete entire tables in SQL?
58. .... ensure database integrity .
59. A column of type CHAR cannot be indexed.
60. Which statement allows us to add a record to a table?