1) Write or select the correct SQL statement that satisfies the following case: Change record with value 'Nick' to 'Cuba' for the 'Last Name' attribute in the table 'Vendors'
A. UPDATE VENDORS SET LAST_NAME='CUBA' WHERE LAST_NAME=NICK
B.INSERT INTO LAST_NAME VALUES("NICK");
C.INSERT INTO 'NICK' VALUES('VENDORS');
D. INSERT INTO VENDORS WHERE LAST_NAME="NICK"
2) Write or select the correct SQL statement that satisfies the following case: Change record with value 'Gary' to 'Jada' for the 'Style' attribute in the table 'Invoice_Line'
A. INSERT INTO STYLE VALUES("GARY");
B.UPDATE INVOICE_LINE SET STYLE ='JADA' WHERE STYLE='GARY'
C. INSERT INTO 'GARY' VALUES('INVOICE_LINE');
D.INSERT INTO INVOICE_LINE VALUES('GARY')
E. INSERT INTO INVOICE_LINE WHERE STYLE="GARY"
3)Write or select the correct SQL statement that satisfies the following case: Change record with value '42' to '40' for the 'Quantity' attribute in the table 'Invoice_Line'
4)Write or select the correct SQL statement that satisfies the following case: Change record with value '38757' to '77503' for the 'Balance Due' attribute in the table 'Invoice'
A. INSERT INTO INVOICE WHERE BALANCE_DUE='38757'
B. INSERT INTO 38757 VALUES ('INVOICE');
C.INSERT INTO INVOICE VALUES(38757')
5) Write or select the correct SQL statement that satisfies the following case: Change record with value 'Atmos Energy Corporation' to 'Interstate Bakeries Corporation' for the 'Company Name' attribute in the table 'Contacts'
A.UPDATE CONTACTS SET COMPANY_NAME='INTERSTATE BAKERIES CORPORATION 'WHERE COMPANY_NAME='ATOMS ENERGY CORPORATION';
B. INSERT INTO CONTACTS WHERE COMPANY_NAME="ATOMS ENERGY CORPORATION"
C. INSERT INTO CONTACTS VALUES('ATOMS ENERGY CORPORATION")
D. INSERT INTO COMPANY_NAME VALUES ("ATOMS ENERGY CORPORATION");
5) Write or select the correct SQL statement that satisfies the following case: Change record with value '34516' to '63525' for the 'Balance Due' attribute in the table 'Invoice'
A.INSERT INTO 34516 VALUES('INVOICE');
B. INSERT INTO INVOICE WHERE BALANCE_DUE='34516'
C. UPDATE INVOICE SET BALANCE_DUE=63525 WHERE
6) Write or select the correct SQL statement that satisfies the following case: Change record with value 'Jodie' to 'Mcqueen' for the 'First Name' attribute in the table 'Vendors'
A.UPDATE VENDORS SET FIRST_NAME='MCQUEEN' WHERE FIRST_NAME='JODIE';
B. INSERT INTO VENDORS VALUES('JODIE")
C. INSERT INTO VENDORS WHERE FIRST_NAME="JODIE"
D. INSERT INTO 'JODIE' VALUES('VENDORS');
E. INSERT INTO FIRST_NAME VALUES('JODIE");
7) Write or select the correct SQL statement that satisfies the following case: Change record with value 'Dustin' to 'Nick' for the 'Last Name' attribute in the table 'Customer'
A. INSERT INTO CUSTOMER WHERE LAST_NAME="DUSTIN"
B.INSERT INTO LAST_NAME VALUES('DUSTIN')
C.UPDATE CUSTOMER SET LAST_NAME='NICK' WHERE LAST_NAME='DUSTIN';
8)Write or select the correct SQL statement that satisfies the following case: Change record with value '33' to '19' for the 'Height' attribute in the table 'Contacts'
A. UPDATE CONTACTS SET HEIGHT=19 WHERE HEIGHT=33;
B. INSERT INTO HEIGHT VALUES('33')
C. INSERT INTO 33 VALUES('CONTACTS');
Please help here are some of the answers to the questions, but it's not all of them
Answer 1:
None of the provided options are correct.
Option B, C and D are incorrect as they are inserting the data into the table
Option A is incorrect because inverted commas ( ' ) are missing in the statement LAST_NAME=NICK
The correct sql query is : UPDATE VENDORS SET LAST_NAME='CUBA' WHERE LAST_NAME='NICK'
Answer 2:
The correct option is B. UPDATE INVOICE_LINE SET STYLE ='JADA' WHERE STYLE='GARY'
Options A, C, D, E are incorrect because they are inserting the data into the table whereas the requirement is to update the data
Answer 3:
UPDATE INVOICE_LINE SET QUANTITY=40 WHERE QUANTITY=42
Answer 4:
None of the options provided are correct as they are inserting the data but the requirement is to update
The correct sql statement is UPDATE INVOICE SET BALANCE_DUE=77503 WHERE BALANCE_DUE=38757
1) Write or select the correct SQL statement that satisfies the following case: Change record with...
How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee WHERE salary BETWEEN 10000 AND 30000; in relational algebraic syntax?
Write the SQL statement to create a five-field table to contain sample student information. The constraints that need to be satisfied by the attributes of this table are as follows: the attribute First_Name is mandatory and can have up to 16 characters, the attribute Last_Name is mandatory and can have up to 16 characters, the attribute Date_Of_Birth is of type date is required, the StarID field identifies each student and is 8 characters long the GPA field is numeric that...
WRITE A SQL QUERY SQL SERVER Write a SELECT statement that returns one column from the Customers table named FullName that joins the LastName and FirstName columns. -- Format this column with the last name, a comma, a space, and the first name like this: -- Doe, John -- Sort the result set by last name in ascending sequence. -- Return only the contacts whose last name begins with a letter from M to Z. -- ...
What is wrong with the following SQL statement? select first_name , last_name , phone from Customer, Orders where customer.customerid = orders.customerid; Group of answer choices 1 You cannot join customer.customerid to orders.cutomerid 2 Nothing is wrong with this statement. 3 The join is wrong. You can only join tables in the FROM clause. 4 The result will be a Cartesian Product.
SQL - write a select statement that returns four columns: vendorName, invoiceNumber, invoiceDate, and invoiceTotal. Return ONE ROW per vendor, representing the vendors invoice with the earliest date.
1. (10pt) Write SQL statement to insert a new record (66", "Python") for columns "CustomerID" and "CustomerName", into the Customers table?
QUESTION 27 The SET command is used in which statement UPDATE SELECT DISTINCT DELETE FROM INSERT VALUES QUESTION 28 Which view would you use to see only the tables you have created ALL_TABLES USER_TABLES USER_TABS ALL_OBJECTS QUESTION 29 Which command should you use to write logical units of work to disk permanently SAVEWORK COMMIT ROLLBACK INSERT QUESTION 30 A Top-N Analysis is capable of ranking a top or bottom set of results. True False QUESTION 31 If you are performing...
SQL SERVER Write a SELECT statement that return the vendor name and the total number of accounts that apply to that vendor’s invoices. Filter the result set to include only the vendor who is being paid more than twice. (HINT: use Vendors table, Invoices table and InvoiceLineItems table). TABLES: Vendor Columns: VendorID, VendorName, DefaultTermsID, DefaultAccountNo Invoices Columns: InvoiceID, VendorID, InvoiceNumber, InvoiceDate, InvoiceTotal, PaymentTotal, CreditTotal, TermsID InvoiceLineItems Columns: InvoiceID, InvoiceSequence, AccountNo, InvoiceLineItemAmount, InvoiceLineItemDescription
Write an SQL CREATE statement to create the structure of a table to store the following employee information empLastName, empFirstName, Dept (foreign key to department table), emp Address, empZip, empCity, empState. Use appropriate data types to reflect the data which will be stored in each attribute. Identify attributes which should not be null by using the correct SQL statements in the create statement
QUESTION 9 You plan to query data using the TRANS_HIST_V view that was created by another user in their schema. Which statement is true? A. The Oracle Server will retrieve the view definition from the ALL_VIEWS data dictionary view. B. The Oracle Server will retrieve data, determined by the query criteria, from the TRANS_HIST_V view. C. The Oracle Server will verify whether you have been granted access privileges to the TRANS_HIST_V view. D. The Oracle Server will automatically reset the...