Question: 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

1 Expert Approved Answer
Step: 1 Unlock

Answer Inserting New Rows into the Terms Table INSERT INTO Terms TermID TermDescription VALUES NULL ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!