Prev | Current Page 238 | Next

Rick Greenwald, Robert Stackowiak, Jonathan Stern

"Oracle Essentials: Oracle Database 11g"


Normally, youcannot delete a row in a parent table if it causes a row in the child
table to violate a foreign key constraint. However, youcan specify that a foreign
key constraint causes a cascade delete, which means that deleting a referenced
row in the parent table automatically deletes all rows in the child table that reference
the primary key value in the deleted row in the parent table.
Check
A check constraint is a more general-purpose constraint. A check constraint is a
Boolean expression that evaluates to either TRUE or FALSE. If the check constraint
evaluates to FALSE, the SQL statement that caused the result returns an
error. For example, a check constraint might require the minimum balance in a
bank account to be over $100. If a user tries to update data for that account in a
way that causes the balance to drop below this required amount, the constraint
will return an error.
Some constraints require the creation of indexes to support them. For instance, the
unique constraint creates an implicit index used to guarantee uniqueness.


Pages:
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
wysyłki kurierem Hauck Condor tani pensjonat nad morzem Automaty samosprzedające baterie łazienkowe