Isbn currentdate 10 newrowisbn end create trigger

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: NewRow, OLD ROW AS OldRow FOR EACH ROW WHEN (NewRow.Qty < 5 AND OldRow.Qty >= 5)) (NewRow.Qty BEGIN ATOMIC INSERT INTO Reorder VALUES (NewRow.ISBN, CURRENT_DATE, 10); (NewRow.ISBN, END; CREATE TRIGGER ReorderTrigger AFTER UPDATE ON Books REFERENCES NEW ROW AS NewRow FOR EACH ROW WHEN (NewRow.Qty < 5) (NewRow.Qty BEGIN ATOMIC INSERT INTO Reorder VALUES (NewRow.ISBN, CURRENT_DATE, 10); (NewRow.ISBN, END; What’s the problem with this trigger? What’ 79 79 NULL Values 80 Three-Valued Logic NOT unknown = unknown Used to represent value that is unknown or inapplicable. OR True False Unknown True Unknown True True True True False Unknown True False AND Unknown True Unknown Unknown Unknown False True Unknown True False False Special comparison operator for null values: IS [NOT] NULL Unknown Unknown What about comparison operators (<, >, =, etc.) and null values? unknown False False False False 81 SQL and NULL Values 82 SQL and NULL Values (continued) Arithmetic operators - return NULL if argument is null WHERE clause is unknown? SQL query eliminates those rows COUNT(*) - includes null values DISTINCT - two rows...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online