Please Write SELECT INTO statements to create one test table named Vendor-Invoice that contain the results of
Fantastic news! We've Found the answer you've been seeking!
Question:
- Please Write SELECT INTO statements to create one test table named Vendor-Invoice that contain the results of a natural join between the Vendors and Invoices tables;
- Please Write an INSERT statement that adds a row to the Invoices table with the following values: VendorID: 132 InvoiceTotal: $434.58 TermsID: 2 InvoiceNumber: AX-014-027 PaymentTotal: $0.00 InvoiceDueDate: 05/8/2020 InvoiceDate: 4/21/2020 CreditTotal: $0.00 PaymentDate:2021-10-11
- Please Write an INSERT statement to insert the first 20 rows of the Vendors table (ordered by DefaultAccountNo) to the VendorCopy table;
- Please Write an INSERT statement that adds a row to the InvoiceCopy table for each invoice with a payment date later than 2020-01-01 in the Invoices table;
- Please Write an UPDATE statement that modifies the VendorCopy table. Change the Default TermsID to 10 for all the vendors in California (e.g., VendorState = 'CA');
- Please Write an UPDATE statement that modifies the InvoiceCopy table. Change the invoice's TermsID to be the corresponding vendor's Default TermsID (hint: DefaultTermsID can be found in the Vendors table). Use a subquery.
- Please Solve exercise 6 using a join rather than a subquery.
Related Book For
Data Modeling and Database Design
ISBN: 978-1285085258
2nd edition
Authors: Narayan S. Umanath, Richard W. Scammel
Posted Date: