| Author: Neetu 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
WITH CHECK OPTION is an optional clause on the CREATE VIEW statement that specifies the level of checking to be done when inserting or updating data through a view. If the option is specified, every row that is inserted or updated through the view must conform to the definition of that view.
For More details refer this. http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/sqlp/rbafywcohdg.htm
regards Neetu
|
| Author: Venkatesh Kumar 03 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
Hi,
WITH CHECK OPTION on a View:
WITH CHECK OPTION is an optional clause on the CREATE VIEW statement that specifies the level of checking to be done when inserting or updating data through a view. If the option is specified, every row that is inserted or updated through the view must conform to the definition of that view.
WITH CHECK OPTION cannot be specified if the view is read-only. The definition of the view must not include a subquery.
If the view is created without a WITH CHECK OPTION clause, insert and update operations that are performed on the view are not checked for conformance to the view definition. Some checking might still occur if the view is directly or indirectly dependent on another view that includes WITH CHECK OPTION. Because the definition of the view is not used, rows might be inserted or updated through the view that do not conform to the definition of the view. This means that the rows cannot be selected again using the view.
The checking can be on of the following:
* WITH CASCADED CHECK OPTION * WITH LOCAL CHECK OPTION
Regards, Venkatesh Kumar K.
|
| Author: Shameer 03 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
WITH CHECK OPTION checks the condition specified on a column whenever you do an insert or update to that column data.
For example, if you have a column named salary and have specified a WITH CHECK constraint to check that salary should be greater than 2500, then whenever you do an insert or update, it will check for the validity of data in the salary column . i.e the salary column should always have a value > 2500.
|