Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 Assuming that all of the table and column sames are spelled correctly, what's wrong with the INSERT statement that follows? INSERT INTO invoices

image text in transcribed
image text in transcribed
image text in transcribed
QUESTION 1 Assuming that all of the table and column sames are spelled correctly, what's wrong with the INSERT statement that follows? INSERT INTO invoices (vendor id, invoice number, invoice total, payment total, credit total, terms id, Invoice date. Invoice_due date) VALUES (97. *456789', 8344.50, 0, 0 1. 2012-08-31) a. The member of items in the column ist doesn't match the number in the VALUES list b. All of the values should be enclosed by single quotes c. The column es in the column stare in the wrong sequence. d. There are too many items in the VALUES last QUESTION 2 Before you can delete a row that has related rows in another table, you need to a.change all of the related rows so they put a row other than the one you want to delete b.delete the related table com safe mode of d. delete the related roms QUESTION 3 Code example 5.1 NOT NULL AUTO_INCREMENT, tem id tem tem Tank INT VARCHAR(50) INT NOT NULL DEFAULT O (Refer to code example 5.1) What are the values of the team id, team name, and team rank columns after the following statement is executed, assuming that the Teams table base row in it with a team id of 19 INSERT INTO teams VALUES (DEFAULT. NULL, 3) 2.2. NULL, 3 b. O. NULL, O O, NULL, 3 d. 2, NULL, 1 QUESTIONS Code example 5-1 NOT NULL AUTO INCREMENT, team 1d to ni tea Tank INT VARCHAR(50) INT NOT NULL DEFAULT O team name, and teammanko mster the following tatement is executed, assuming that the Teams table basse row in it with a l id of 12 Refer to code example 3-1.) What are the values of the team INSERT INTO teams to name) VALUES ('Angels' 2.1. Angels, 1 ob. 2. Regis, 1 OG 2, gels, 0 d. 1. Angels, O QUESTIONS When you use a subquery to insert rows from one table into another be which of the following statement is not true a. The targettable must ready exist b. You must include a SELECT statement that retrieves the rows to be inserted O Yousust omit the VALUES clause from the INSERT statement d. You susomit the columnist from the INSERT state QUESTION 6 with a SELECT statement is not true Which of the following statements about creating a table in the CREATE TABLE AS a. You can include any of the cases of the SELECT b. Each columname in the SELECT cause must be use c. The table to exist d. The definitions of primary keys foreign and indexes are included in the new table QUESTION 7 Which of the following t he best describe what this INSERT Matement does INSERT INTO LO CO SELECT * FROM micaa WHERE terms id-1 a. Adde w from the invoices table to devices Copy table b. Adds all of the Tows is the invoice table that have in the terms_id columns to the Invoices_Copy table Adds all of the rows is the invoice table to the invoices Copywle and the terms id column to 1 in each row d. Updates all of the rows in the invoices Coov table that have in the count the rows is the invoices table QUESTION 8 Which of the following statements best describes what this UPDATE statement does? UPDATE invoices SET credit_total invoice_total - payment_total WHERE vendor id = 10 AND invoice total - payment_total - credit_total > 0 a. Updates the credit_total column for all invoices with 10 in the vendor_id column and a balance due so they don't have a balance due. .b. Updates the credit_total column for the first invoice with 10 in the vendor_id column and a balance so it doesn't have a balance due. c. Updates the credit_total column for all invoices with a balance due so they don't have a balance due. d. Updates the credit total column for all invoices with a balance due so they don't have a balance due QUESTION 9 Which of the following statements is true when you use MySQL Workbench to run INSERT, UPDATE, and DELETE statements? a. By default, the changes are rolled back when you exit MySQL Workbench unless you commit them .b. If autocommit mode is on, you can rollback the changes by clicking on the Rollback button c. By default, the changes are automatically committed to the database. d. If autocommit mode is on, you can commit the changes by clicking on the Commit button QUESTION 10 Which of the following statements would you use to change the invoice_total value in the Invoices table so it's 1% less than the current invoice total for every vendor in the state of Arizona? UPDATE invoices SET invoice_total = invoice_total . .01 WHERE vendor_id - (SELECT vendor_id FROM vendors WHERE vendor state - 'AZ') UPDATE invoices SET invoice_total - invoice_total +.01 WHERE vendor_id IN (SELECT vendor_id FROM vendors WHERE vendor_state = 'AZ) UPDATE invoices SET Invoice_total - invoice_total - (invoice_total . .01) WHERE vendor_id - (SELECT vendor_id FROM vendors WHERE vendor state - 'AZ) UPDATE invoices SET invoice_total = invoice_total - (invoice_total + .01) WHERE vendor_id IN (SELECT vendor_id FROM vendors WHERE vendor state = 'AZ')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

Students also viewed these Databases questions

Question

=+Are the contracts enforceable?

Answered: 1 week ago