USoft Rule Language Examples: Insert Statements |
The following example illustrates the use of the USoft Rule Language ADD WHERE NOT EXISTS keyword in an insert statement, as used for corrective constraints. NOTE: The construct with ADD WHERE NOT EXISTS is much more compact than its SQL Equivalent, because it implies the WHERE condition and subquery that check that the record to be inserted does not already exist. The disadvantage of ADD WHERE NOT EXISTS is that it will only let you write INSERT statements that perform this check. This is a slight disadvantage, since the vast majority of corrective INSERT constraints require this check.
See Also |