ibm-information-center/dist/eclipse/plugins/i5OS.ic.sqlp_5.4.0.1/rbafywcohdg.htm

71 lines
5.1 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="WITH CHECK OPTION on a View" />
<meta name="abstract" content="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." />
<meta name="description" content="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." />
<meta name="DC.subject" content="view, WITH CHECK, CREATE VIEW statement, WITH CHECK OPTION" />
<meta name="keywords" content="view, WITH CHECK, CREATE VIEW statement, WITH CHECK OPTION" />
<meta name="DC.Relation" scheme="URI" content="rbafyviewnt.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafywithcascade.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafywithlocalcheck.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyexcascade.htm" />
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmsthcview.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafywcohdg" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>WITH CHECK OPTION on a View</title>
</head>
<body id="rbafywcohdg"><a name="rbafywcohdg"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">WITH CHECK OPTION on a View</h1>
<div><p>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.</p>
<div class="section"><p>WITH CHECK OPTION cannot be specified if the view is read-only.
The definition of the view must not include a subquery.</p>
</div>
<div class="section"><p>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.</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbafywithcascade.htm">WITH CASCADED CHECK OPTION</a></strong><br />
The WITH CASCADED CHECK OPTION clause specifies that every row that is inserted or updated through the view must conform to the definition of the view.</li>
<li class="ulchildlink"><strong><a href="rbafywithlocalcheck.htm">WITH LOCAL CHECK OPTION</a></strong><br />
The WITH LOCAL CHECK OPTION clause is identical to the WITH CASCADED CHECK OPTION clause except that you can update a row so that it no longer can be retrieved through the view. This can only happen when the view is directly or indirectly dependent on a view that was defined with no WITH CHECK OPTION clause.</li>
<li class="ulchildlink"><strong><a href="rbafyexcascade.htm">Cascaded check option</a></strong><br />
This example illustrates using the Cascaded check option.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyviewnt.htm" title="A view can be used to access data in one or more tables or views. You create a view by using a SELECT statement.">Create and use views</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../db2/rbafzmsthcview.htm">CREATE VIEW</a></div>
</div>
</div>
</body>
</html>