Manipulating Data (Section 3)

Description

Databases
Craig Willey
Quiz by Craig Willey, updated more than 1 year ago
Craig Willey
Created by Craig Willey about 4 years ago
18
0

Resource summary

Question 1

Question
Which of the following is true of the SQL statement?
Answer
  • The statement will result in an implicit commit.
  • The statement will remove all data from any INDEX objects associated with that table.
  • The statement will not fire any DML triggers on the table.
  • The statement will fail.

Question 2

Question
The CASCADE keyword, when used with TRUNCATE:
Answer
  • Is required if the table has any dependent child tables
  • Will ensure that future attempts to insert rows to the table will be rejected if they satisfy the TRUNCATE table’s WHERE clause
  • Can be used with the optional DEPENDENCY keyword
  • None of these

Question 3

Question
TRUNCATE TABLE:
Answer
  • Cannot be used within a valid SQL statement
  • Is a valid set of keywords to be used within a DDL statement
  • Does not require the DROP_ANY_TABLE privilege
  • Is a valid statement that will truncate a table called TABLE

Question 4

Question
The table will create successfully. What will result from the INSERT statement?
Answer
  • The INSERT will fail because there is no list of columns after STUDENT_LIST.
  • The INSERT will fail because the literal value for PHONE is numeric and PHONE is a character data type.
  • The INSERT will execute—the table will contain one row of data.
  • None of these.

Question 5

Question
The table will create successfully. What will be the result of the two INSERT statements?
Answer
  • Neither will execute.
  • The first will execute, but the second will fail.
  • The first will fail, but the second will execute.
  • Both will execute successfully.

Question 6

Question
What will be the result of the INSERT statement?
Answer
  • It will fail because there is no column list in the INSERT statement.
  • It will fail because there is no PRIMARY KEY in the table.
  • It will execute and create a new row in the table.
  • It will fail because the last name and first name values are reversed.

Question 7

Question
Which of the following reserved words is not required in order to form a syntactically correct UPDATE statement?
Answer
  • UPDATE
  • SET
  • WHERE
  • None of these

Question 8

Question
Assume a table LAMPS that has no constraints. Which of the following is true about the UPDATE statement and the LAMPS table? (Choose all that apply.)This
Answer
  • UPDATE can be used to add rows to LAMPS by setting values to all the columns.
  • UPDATE can be used to remove a row from LAMPS by setting all of the row’s columns to a value of NULL.
  • For existing rows in LAMPS, UPDATE can add values to any column with a NULL value.
  • For existing rows in LAMPS, UPDATE can remove values from any column by changing its value to NULL.

Question 9

Question
What can be said of the statements listed here?
Answer
  • One row will be updated.
  • Two rows will be updated.
  • At least one of the statements will not execute.
  • None of these.

Question 10

Question
What is the end result of the SQL statements listed here?
Answer
  • The BOUNCERS table will contain one row.
  • The BOUNCERS table will contain two rows.
  • The UPDATE will fail because there is no WHERE clause.
  • None of these.

Question 11

Question
Which of the following reserved words is/are optional in a complete DELETE statement? (Choose all that apply)
Answer
  • FROM
  • WHERE
  • DELETE
  • REMOVE

Question 12

Question
Which of the following SQL statements will remove the word VALID from row 1, resulting in one row with a status of NULL and two rows with a status of PENDING?
Answer
  • DELETE FROM PARTS WHERE STATUS = 'VALID' ;
  • DELETE PARTS WHERE PNO = 1 ;
  • DELETE FROM PARTS SET STATUS = NULL WHERE PNO = 1 ;
  • None of these

Question 13

Question
Which of the following best describes the results of attempting to execute the DELETE statement?
Answer
  • The DELETE statement will fail because it is missing a column list between the word DELETE and the name of the table AB_INVOICES.
  • The DELETE statement will execute, but no rows in the table will be removed.
  • The DELETE statement will produce a syntax error because it is referencing a row that does not exist in the database.
  • None of these.

Question 14

Question
In this series of SQL statements, which line represents the first commit event?
Answer
  • Line 1
  • Line 2
  • Line 4
  • Line 5
  • Line 6

Question 15

Question
What will be the result of the execution of the SQL statements shown here?This
Answer
  • The ADDRESSES table will have one row with a value of 1 for ZONE.
  • The ADDRESSES table will have one row with a value of 2 for ZONE.
  • The ADDRESSES table will have no rows.
  • None of these.
Show full summary Hide full summary

Similar

Structured Query Language (SQL) (Section 1)
Craig Willey
Using DDL Statements to Create and Manage Tables ( Section 2)
Craig Willey
Restricting and Sorting Data (Section 4)
Craig Willey
Homeostasis
kristenfinkas
WAVES
toritorx
Meriya Pinales & Malika Hurt
hurtmalika
Third Space Academia
k.fenbyhulse
Realidad De Nuestra Identidad Cultural
53831
AS Economics Key Terms
Fred Clayton
Human Anatomy Final
cierarosebernal3
English Literature (Topics based on: A Christmas Carol, Macbeth, An Inspector Calls, Poetry, and Unseen Poetry)
Larissa Thomson