GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Database  >  Sybase
Go To First  |  Previous Question  |  Next Question 
 Sybase  |  Question 58 of 64    Print  
Views 'with check' Option
What is the use of 'with check' option in views?


  
Total Answers and Comments: 2 Last Update: November 24, 2008     Asked by: mamtasahu 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: dhampack
 
When you create a view using the with check option clause, each insert and update through the view, is validated against the view’s selection criteria. If the rows inserted or updated are out of criteria then it fails and gives error message. For ex, you have a view named sybase_books
create view sybase_books as select * from books where type='sybase' with check option.
If you try to insert rows through view where type='oracle' then it will fail, for ex
insert into sybase_books values ('Oracle theory','oracle')

Above answer was rated as good by the following members:
cyril2cyril
October 08, 2008 10:55:51   #1  
AjeetPrasad Member Since: October 2008   Contribution: 1    

RE: Views 'with check' Option

This restriction determines what types of modifications you can make through views with check options. If a view has a with check option clause each row inserted or updated through the view must be visible within the view.


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    
November 23, 2008 22:45:01   #2  
dhampack Member Since: November 2008   Contribution: 6    

RE: Views 'with check' Option
When you create a view using the with check option clause each insert and update through the view is validated against the view s selection criteria. If the rows inserted or updated are out of criteria then it fails and gives error message. For ex you have a view named sybase_books
create view sybase_books as select * from books where type 'sybase' with check option.
If you try to insert rows through view where type 'oracle' then it will fail for ex
insert into sybase_books values ('Oracle theory' 'oracle')

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

Copies definitions for specified views, rules, defaults, triggers, procedures, or reports from a database to an operating system file or from an operating system file to a database. 
Latest Answer : Defncopy is a sybase tool that defines the objective statements such views, triggers, defaults,rules and so on ...
Read Answers (2) | Asked by : James

Latest Answer : In addition to syslogshold one can look at master.sysprocess and the physical_io. If this is large (several hundred thousand) you are probably looking at a query doing a table scan. syslogshold tends to only store teh *longest*. ...
Read Answers (2) | Asked by : srihari

Latest Answer : In pre sybase 15 all database options will take effect after a use database and checkpoint command is run.For Sybase 15 the option take effect immediately since all sp_dboption commands have an automatic checkpoint. ...
Read Answers (1) | Asked by : srihari

What is the use of 'with check' option in views? 
Latest Answer : When you create a view using the with check option clause, each insert and update through the view, is validated against the view’s selection criteria. If the rows inserted or updated are out of criteria then it fails and gives error message. For ex, ...

How do you check db space and what are the measures available to increase the db space? 
Latest Answer : sp_helpdb gives information about memory used and available.sp_spaceused - gives space used.. ...
Read Answers (1) | Asked by : nslk.sap


 Sponsored Links

 
Related Articles

Performing DML Operations on XML Schema Based XMLType Views

Performing DML Operations on XML Schema Based XMLType Views Analyzing the underlying query of the empSch v view discussed in the preceding section you may note that each attribute of the EMP T object used in the select list maps to a certain column of a single table namely emps What this means in pr
 

Using XMLType Views

Using XMLType Views Using XMLType Views XMLType views provide a convenient way to construct XML representations of relational data without physically migrating that data into XML Once written an XMLType view may be used in various queries making them simpler and so increasing their readability mosgo
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Moving All the XML Processing into the Database

Moving All the XML Processing into the Database In the preceding example the database server performs only a part of the XML processing while the rest is still performed by the PHP engine Specifically the database server generates an employees XML document based on the records from the hr employees
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

What is Operational Database

Operational Database is the database-of-record, consisting of system-specific reference data and event data belonging to a transaction-update system. It may also contain system control data such as indicators, flags, and counters. The operational database is the source of data for the data warehouse
 

Evolution of database systems

The Evolution of Database systems File Management System Hierarchical database System  Network Database System  Relational Database System File Management System: The file management system also called as FMS in short is one in which all data is stored on a singl
 

What is the use of COUNT with DISTINCT option

COUNT is a group function returns result by summarizing multiple rows. All group by value function will have the usage of DISTINCT or ALL option and so is the COUNT which uses the DISTINCT option. DISTINCT option is used to enforce uniqueness and  if combined with COUNT is used to
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape