This quiz works best with JavaScript enabled. Home > Cbse > Class 12 > Science > Computer Science > Class 12 Computer Science Chapter 4 Structured Query Language (Sql) – Quiz 3 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 4 Structured Query Language (Sql) Quiz 3 (37 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. You're creating a table for a pizza delivery app.Which column might allow NULL values? A) Customer comments TEXT. B) Pizza size VARCHAR(20). C) Extra cheese BOOLEAN. D) Delivery address VARCHAR(100). Show Answer Correct Answer: A) Customer comments TEXT. 2. Which SQL command is used to insert new records into a table? A) INSERT INTO. B) UPDATE. C) SELECT. D) DELETE FROM. Show Answer Correct Answer: A) INSERT INTO. 3. Identify the SQL command use to add price column into PRODUCT table. A) ALTER TABLE PRODUCTMODIFY COLUMN price decimal (6, 2). B) ALTER TABLE PRODUCTMODIFY price decimal (6, 2). C) ALTER TABLE PRODUCTADD COLUMN price decimal (6, 2). D) ALTER TABLE PRODUCTADD price decimal (6, 2);. Show Answer Correct Answer: D) ALTER TABLE PRODUCTADD price decimal (6, 2);. 4. Yang manakah BUKAN fungsi agregat SQL?Apakah penyataan SQL untuk memilih semua attribut dari Jadual Designer? A) SELECT * FROM Designer. B) SELECT FROM Designer. C) SELECT Designer.*. D) SELECT All FROM Designer. Show Answer Correct Answer: A) SELECT * FROM Designer. 5. Pernyataan SELECT digunakan untuk mencapai data-data daripada jadual dalam pangkalan data. SELECT terdiri daripada tiga pernyataan asas KECUALI: A) SELECT. B) FROM. C) WHERE. D) AND. Show Answer Correct Answer: D) AND. 6. Which command is used to retrieve all records from the table? A) SELECT all FROM Users. B) RETRIVE all FROM Users. C) SELECT * FROM Users. D) RETRIVE * FROM Users. Show Answer Correct Answer: C) SELECT * FROM Users. 7. What does the SQL statement 'UPDATE world SET population = 2000000, name = 'Wonderland' WHERE capital = 'Emerald City" do? A) Updates the population and name of records with the capital 'Emerald City' in the 'world' table. B) Deletes records from the 'world' table. C) Inserts new records into the 'world' table. D) Retrieves data from the 'world' table. Show Answer Correct Answer: A) Updates the population and name of records with the capital 'Emerald City' in the 'world' table. 8. Berikut menunjukkan pernyataan SQL untuk mengemaskini stok barangan. Jika stok kurang daripada 20 unit, sebanyak lima unit barang akan ditambah.1 ..... A ..... BARANG2 ..... B ..... Kuantiti = Kuantiti + 53 ..... C ..... Kuantiti < 20 A) UPDATEB. SETC. WHERE. B) UPDATEB. FROMC. WHERE. C) ALTER TABLEB. ADDC. WHERE. D) SELECTB. FROMC. WHERE. Show Answer Correct Answer: A) UPDATEB. SETC. WHERE. 9. Which of the following statements is true about a relational database? A) It stores data in a single, flat file. B) It uses relationships to link data across tables. C) It does not require a primary key for each table. D) It cannot store data electronically. Show Answer Correct Answer: B) It uses relationships to link data across tables. 10. Which clause allows you to SORT data? A) WHERE. B) FROM. C) ORDER BY. D) HAVING. Show Answer Correct Answer: C) ORDER BY. 11. In creating a table named "Students2024" . Can you identify which is missing or error in the statement below:CREATE Students2024(Employee ..... ID INTEGER, LASTNAME TEXT (50), FIRSTNAME TEXT (50)) A) TABLE. B) No error. C) Comma (s). D) Spelling error. Show Answer Correct Answer: A) TABLE. 12. It is a DML command that is used to display record. A) SELECT. B) DISPLAY. C) WHERE. D) STRUCTURE. Show Answer Correct Answer: A) SELECT. 13. WHICH QUERY?defines the list of fields to be displayed A) FROM. B) WHERE. C) ORDER BY. D) SELECT. Show Answer Correct Answer: D) SELECT. 14. DDL stands for ..... A) Digital Definition Language. B) Data Defined Language. C) Data Definition Limit. D) Data Definition Language. Show Answer Correct Answer: D) Data Definition Language. 15. The original version of SQL was developed at ..... A) Honeywell. B) Microsoft. C) IBM. D) Sun Microsystems. Show Answer Correct Answer: C) IBM. 16. Which of the following is true about SQL joins? A) An outer join returns only matching rows. B) An inner join returns the results of the outer join as well as the unmatched rows. C) A full outer join returns results of an inner join as well as the results of a left and right join. D) None of these is true. Show Answer Correct Answer: C) A full outer join returns results of an inner join as well as the results of a left and right join. 17. What does the SQL statement 'DROP TABLE employee' do? A) Deletes the 'employee' table. B) Inserts a new table called 'employee'. C) Updates the 'employee' table. D) Retrieves data from the 'employee' table. Show Answer Correct Answer: A) Deletes the 'employee' table. 18. An UNSIGNED int can be a negative number. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 19. Which of the following best describes a foreign key? A) It is a field that links to the primary key of another table. B) It is a field that must be unique for each record in a table. C) It is a single entry in a table. D) It is a type of database that organises data into related tables. Show Answer Correct Answer: A) It is a field that links to the primary key of another table. 20. Which SQL command is used to modify data in a table? A) INSERT INTO. B) SELECT. C) DELETE FROM. D) UPDATE. Show Answer Correct Answer: D) UPDATE. 21. Pilih penyataan SQL yang digunakan untuk mengemaskini Pangkalan Data A) UPDATE. B) MODIFY. C) EDIT. D) SAVE. Show Answer Correct Answer: A) UPDATE. 22. You realize your CREATE TABLE statement forgot to add a column for "favorite ..... movie" . What's the best way to fix this? A) Delete the table and start over. B) Use ALTER TABLE to add the column. C) Cry and hope the problem goes away. D) Ignore the request; a table cannot be changed after creation. Show Answer Correct Answer: B) Use ALTER TABLE to add the column. 23. When might one prefer the CHAR column type over VARCHAR? A) When the data is relatively short and almost always present. B) When the data is prose like a discussion comment versus a logical key. C) When the data has widely varying lengths. D) When the data needs to be searched using a LIKE clause. Show Answer Correct Answer: A) When the data is relatively short and almost always present. 24. Which statement is true to delete the table "Employee ..... list ..... V1" from the database. A) DELETE Employee list V1. B) DROP TABLE Employee list V1. C) DEL TABLE Employee list V1. D) DROP TABLE "Employee list V1". Show Answer Correct Answer: B) DROP TABLE Employee list V1. 25. .... command remove all records from a table, also release the space occupied by those records A) Truncate. B) Alter. C) Create. D) Drop. Show Answer Correct Answer: A) Truncate. 26. Which command is used to insert new records into a database table? A) Create record. B) Append data. C) Insert into. D) Add record. Show Answer Correct Answer: C) Insert into. 27. What is a relationship in the context of databases? A) A field that uniquely identifies each record in a table. B) A single entry in a table. C) A connection between two tables in a database. D) A type of database that organises data into related tables. Show Answer Correct Answer: C) A connection between two tables in a database. 28. AVG, COUNT, MAX, MIN and SUM are known as what? A) Calculated field. B) Subqueries. C) Aggregate functions. D) Wildcard filters. Show Answer Correct Answer: C) Aggregate functions. 29. Write the code for the following:Return all movies with the word love. A) SELECT * FROM movies WHERE name LIKE '%love%';. B) SELECT * FROM movies WHERE name LIKE %love;. C) SELECT * FROM movies WHERE name LIKE 'love';. D) SELECT * FROM movies WHERE name LIKE %love%;. Show Answer Correct Answer: A) SELECT * FROM movies WHERE name LIKE '%love%';. 30. Apakah penyataan SQL yang digunakan untuk membina Jadual Database bertajuk 'Customers'? A) CREATE TABLE Customers. B) CREATE DB Customers. C) CREATE DATABASE Customers. D) CREATE DATABASE TABLE Customers. Show Answer Correct Answer: A) CREATE TABLE Customers. 31. WHICH QUERY?defines the way in which the data will appeare.g ..... age DESC A) ORDER BY. B) WHERE. C) FROM. D) SELECT. Show Answer Correct Answer: A) ORDER BY. 32. .... are the values given to make the clause complete. A) Keywords. B) Clauses. C) Arguments. D) Commands. Show Answer Correct Answer: C) Arguments. 33. Which character returns all the data found in a table? A) *. B) #. C) %. D) /. Show Answer Correct Answer: A) *. 34. SQL commands are divided into ..... categories. A) 2. B) 4. C) 5. D) 3. Show Answer Correct Answer: C) 5. 35. Which keyword will cause the results of the query to be displayed in sorted order? A) WHERE. B) GROUP BY. C) None of these. D) ORDER BY. Show Answer Correct Answer: D) ORDER BY. 36. .... constraint ensures that no two rows have the same value in the specified columns. A) Check. B) Primary Key. C) Default. D) Unique. Show Answer Correct Answer: D) Unique. 37. What is the primary value add of relational databases over flat files? A) Ability to store data in a format that can be sent across a network. B) Ability to scan large amounts of data quickly. C) Ability to execute PHP code within the file. D) Ability to execute JavaScript in the file. E) Ability to quickly convert data to HTML. Show Answer Correct Answer: B) Ability to scan large amounts of data quickly. ← PreviousRelated QuizzesScience QuizzesClass 12 QuizzesClass 12 Computer Science Chapter 4 Structured Query Language (Sql) Quiz 1Class 12 Computer Science Chapter 4 Structured Query Language (Sql) Quiz 2Class 12 Computer Science Chapter 1 Data Structures Using Python QuizClass 12 Computer Science Chapter 2 Advanced Python Programming QuizClass 12 Computer Science Chapter 3 Database Management Systems QuizClass 12 Computer Science Chapter 5 Networking And Cyber Security QuizClass 12 Computer Science Chapter 6 Boolean Algebra And Logic Gates Quiz 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books