422 Part I EXAM PREPARATION re-create it. The

422 Part I EXAM PREPARATION re-create it. The next section leads you through the requirements for updating data through a view. FIGURE 7.13 Deleting data via a view. Updating Rows Through Views You can use an UPDATE statement to change one or more rows that a view references. Any changes that are undertaken through the view are actually applied to the underlying table in which the view is defined. The restrictions that applied to INSERT statements used with views also apply to UPDATE statements. These restrictions include the following: UPDATE statements must modify only one of the underlying tables at a time. If you want to UPDATE data that resides in more than one table, you have to perform the UPDATE in two or more statements. Updated data must conform to the view definition when WITH CHECK is specified on the view. Updated data cannot create FOREIGN KEY constraint violations. When updating a view, you may want to use the WITH CHECK OPTION to force all data modifications executed to be constrained by the view definition. This is important for the same reasons that were important when dealing with inserts: it reduces user confusion with disappearing data, and it enables users to always confirm the accuracy of their data UPDATE. To UPDATE a record, follow Step by Step 7.7. STEP BY STEP 7.7 Updating Data Through a View

For reliable and cheap web hosting services please check javaweb hosting website.

Comments are closed.