Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Items 8 and 9 are weighted at 15% each. 8) In SQL Server, you turn off a constraint using: ALTER TABLE tableName NOCHECK CONSTRAINT constraintName;

Items 8 and 9 are weighted at 15% each.

8) In SQL Server, you turn off a constraint using:

ALTER TABLE tableName NOCHECK CONSTRAINT constraintName;

Predictably, you turn it back on with:

ALTER TABLE tableName CHECK CONSTRAINT constraintName;

The issue is that the data that were entered while it was disabled are never ckecked.

Consider the following SQL statement (this particular syntax is unique to SQL Server).

ALTER TABLE invoiceLineItems WITH CHECK

CHECK CONSTRAINT FK_Inv_Line;

The first line says to change the table and to recheck existing data against the constraint named in the second line. I always break that one onto two lines only because it really looks weird when I write: ...WITH CHECK CHECK... Paste that last SQL statement into a query window and attempt to run it... it will fail because there are invalid data in the table.

Write an SQL statement that will find them all. (That means that you have to figure out what is wrong.)

9) Write an SQL statement that will list the vendorName, invoiceID, and invoiceSequence. The vendorName is in the vendors table and the invoiceSequence is in the invoiceLineItems table. The vendors and invoiceLineItems tables are related only through invoives. Show only the vendor names that participate in the vendor/invoice relationship and all of the rows from the invoiceLineItems table including any unmatched rows. (Hint: see textbook page 146.)

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_2

Step: 3

blur-text-image_3

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

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions