2024 Answered IACCP Master Question Bank Questions The statement below is an example from which SQL sublanguage? SELECT ProductName FROM Product; a. Data Definition Language b. Data Query Language c. Data Manipulation Language d. Data Transaction Language b. Data Query Language What is the correct statement for creating a database called reservationDB? a. DATABASE CREATE reservationDB; b. CREATE DB reservationDB; c. CREATE reservationDB DATABASE; d. CREATE DATABASE reservationDB; d. CREATE DATABASE reservationDB; A database system has a database called onlineShop. What is the result of a CREATE statement that tries to create onlineShop a second time? a. The statement replaces onlineShop with a new onlineShop database. b. The statement produces an error that the database already exists. c. The statement creates a copy of the database onlineShop as onlineShop_1. d. The statement is ignored. b. The statement produces an error that the database already exists. What is the correct statement for deleting a database? a. DROP DATABASE <databaseName>; b. DROP <databaseName>; c. DATABASE DROP <databaseName>; d. DELETE DATABASE <databaseName>; a. DROP DATABASE <databaseName>; What should be added to the SQL statements to produce the Result table below? (see diagram 45) USE _____; SHOW _____; a. DATABASE, COLUMNS b. onlineshop, TABLE c. DATABASE, CREATE TABLE d. onlineShop, TABLES d. onlineShop, TABLES Which column is best to replace XXX in the SQL statement below? CREATE TABLE Supplier ( SupplierId INT NOT NULL AUTO_INCREMENT, CompanyName VARCHAR(40), ContactName VARCHAR(50), Phone VARCHAR(30), PRIMARY KEY (XXX) ); a. SupplierId b. CompanyName c. ContactName d. Phone a. SupplierId A database designer wants to create three tables: Supplier, Product, and Country. The Supplier table has a CountryId column with values that must appear in the Country table's CountryId column. The Product table has an auto -increment column. Which table's CREATE TABLE statement(s) must specify a F OREIGN KEY? a. Supplier b. Product c. Country d. Supplier and Country a. Supplier Which of the following is not true about the INSERT statement? a. A single INSERT statement can only add one row. b. The INSERT statement is used to add new values into the table. c. The column names can be omitted in an INSERT statement. d. The VALUES order must match the column order in the INTO clause. a. A single INSERT statement can only add one row. Refer to the column information produced bySHOW COLUMNS FROM Supplier;statement. CountryId is a foreign key that references the CountryId column in the Country table. Which statement correctly inserts Oshkosh Bgosh? (See Diagram 50) a. INSERT INTO Supplier (SupplierId, CompanyName, ContactName, CountryId)VALUES (5, 'Oshkosh Bgosh', 'Martina Perry', 2); b. INSERT INTO Supplier (CompanyName, ContactName, CountryId)VALUES ('Oshkosh Bgosh', 'Martina Perry', 2); c. INSERT INTO SupplierVALUES ('Oshkosh Bgosh', 'Martina Perry', 2); d. INSERT INTO Supplier (SupplierId, CompanyName, ContactName, CountryId)VALUES (NULL, 'Oshkosh Bgosh', 'Martina Perry', 2); b. INSERT INTO Supplier (CompanyName, ContactName, CountryId)VALUES ('Oshkosh Bgosh', 'Martina Perry', 2); Refer to the Supplier table. Which statement correctly changes Adan Stevens to Maria Stevens? (See Diagram 51) a. UPDATE Supplier SET ContactName = 'Maria Stevens' WHERE SupplierId = '5'; b. UPDATE SupplierSET ContactName = 'Maria Stevens' WHERE SupplierId = 5; c. UPDATE Supplier (ContactName = 'Maria Stevens' ) WHERE SupplierId = 5; d. UPDATE Supplier SET 'Alan Stevens' = 'Maria Stevens' WHERE SupplierId = '5'; b. UPDATE SupplierSET ContactName = 'Maria Stevens' WHERE SupplierId = 5; Which statement selects all rows and just the ProductName and Size columns from the Product table? a. SELECT *, ProductName, Size FROM Product; b. SELECT ProductName, Size FROM Product; c. SELECT * FROM Product; d. SELECT ProductId, ProductName, Size FROM Product; b. SELECT ProductName, Size FROM Product; Refer to the Product table. Which columns are present in the query's result table? (see Table 53) SELECT * FROM Product; a. ProductId, ProductName, Quantity b. ProductId, ProductName, UnitPrice c. All columns are present d. No columns are present c. All columns are present