Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Insert Into what SQL query can be used to insert new rows into the Terms table for 120 and 180 day terms? 2.

Using Insert Into what SQL query can be used to insert new rows into the "Terms" table for 120 and 180 day terms? 

 

2. Using Select Into and Update (with a Subquery) what SQL query can be used to make a new table called "InvoiceCopy" that contains all the data from the "Invoices" table? After creating the new table, what SQL query can be used to update the Terms ("TermsID" column) to the newly created 120 Day term for all Vendors in 'CA' and 'NV'?

 

 3. Using Delete what SQL query can be used to delete rows from the "InvoiceCopy" table where the Invoice Total is less than $200?

 

4. Using Delete (with a Subquery) what SQL query can be used to delete rows from the "Invoices_Paid" table where the Vendor is based in Michigan ('MI')?

Connect C + dbo.InvoiceArchive dbo.InvoiceLineltems + dbo.Invoices dbo.Terms dbo.Vendors Columns VendorID Object Explorer Connect DESKTOP-61CT7Q1 (SQL Server 16.0.1050.5 - DESKTOP-61CT7Q1User) Databases + * * + Object Explorer Connect +++ + E HO AP + + + 1 Database Diagrams Tables System Tables File Tables External Object Explorer Connect - Database Snapshots AP  Database Diagrams Tables System Tables File Tables External 

Connect C + dbo.InvoiceArchive dbo.InvoiceLineltems + dbo.Invoices dbo.Terms dbo.Vendors Columns VendorID (PK, int, not null) VendorName (varchar(50), not null) VendorAddress 1 (varchar(50), null) VendorAddress2 (varchar(50), null) E VendorCity (varchar(50), not null) VendorState (char(2), not null) VendorZipCode (varchar(20), not null) VendorPhone (varchar(50), null) VendorContactLName (varchar(50), null) VendorContactFName (varchar(50), null) DefaultTermsID (FK, int, not null) DefaultAccountNo (FK, int, not null) Keys TO PK_Vendors FK Vendors_GLAccounts OFK Vendors_Terms Constraints DF_Vendors_AccountNo DF_Vendors TermsID Triggers Indexes IX_VendorName (Non-Unique, Non-Clustered) IX_Vendors_Account No (Non-Unique, Non-Clustered) IX_Vendors_TermsID (Non-Unique, Non-Clustered) TOPK_Vendors (Clustered) Statistics _WA_Sys_00000008_3F466844 IX VendorName MIX Vendors_AccountNo IX Vendors_TermsID HPK_Vendors Views External Resources Synonyms

Step by Step Solution

3.47 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

Answer Inserting New Rows into the Terms Table INSERT INTO Terms TermID TermDescription VALUES NULL ... 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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

What is a fat client? What is a thin client?

Answered: 1 week ago

Question

How do you sort data in an Access query?

Answered: 1 week ago