Regexp_like with check constraint

Hi all,
My requirement is User should not enter the data like ( ½, ¼,...).
I have created table with check constraint with the following syntax:
CREATE TABLE mytest (c1 VARCHAR2(20),
CHECK (REGEXP_LIKE(c1,'^[[:alnum:]+[:digit:]+[!@#]]+$')));
The above means, except alphanumeric, digits, and keyboard characters should allow. But it is not allowing any characters.
Please help me, any mistake in the above syntax.
Thanks
Mano

Hi, Mano,
user533671 wrote:
Hi all,
My requirement is User should not enter the data like ( ½, ¼,...).
I have created table with check constraint with the following syntax:That's a couple of examples of values that are not allowed. Now give some examples of values that are allowed, and the reasons why each are allowe or not.
For example, is 'GREEN/BLUE', with a slash between letters, allowed? How about '1/' with no number after the slash?
>
CREATE TABLE mytest (c1 VARCHAR2(20),
CHECK (REGEXP_LIKE(c1,'^[[:alnum:]+[:digit:]+[!@#]]+$')));
The above means, except alphanumeric, digits, and keyboard characters should allow. But it is not allowing any characters.
Please help me, any mistake in the above syntax.You're using square brackets inside square brackets. If you really need to do that, then the right ']' must be the first character listed.
Post 5 or 10 INSERT statements. Tell which INSERTs should work, and which ones should fail because of the CHECK constraint, and explain why in each case.

Similar Messages

  • Peculiar problem in oracle 10g  on AIX 5.3.0 With Check constraints

    Hi Every One,
    I am facing peculiar problem in oracle 10.2.0.1.0,AIX 5.3.0. I created table with check constraints like this
    create table test1 (name nvarchar2(1),check (name in('Y','N')));
    SQL> create table test1 (name nvarchar2(1),check (name in('Y','N')));
    Table created.
    SQL> insert into test1 values ('Y');
    1 row created.
    SQL> COMMIT;
    SQL> select from test1 where name = 'Y';* Why this statement is n't working
    no rows selected
    SQL> select * from test1;
    N
    Y
    ANOTHER INTERSTING ONE IS
    SQL> select * from test1 where name in('Y'); Why this statement is n't working
    no rows selected
    SQL> select * from test1 where name in('Y','Y'); it's working
    N
    Y
    SQL> select * from test1 where name in('','Y'); it's working
    N
    Y
    SQL> select * from test1 where name in('7','Y'); it's working
    N
    Y
    Like
    SQL> select * from test1 where name like 'Y'; it's not working
    no rows selected
    I created a table without check constraints
    SQL> create table test2 (name nvarchar2(1));
    Table created.
    SQL> insert into test2 values ('Y');
    1 row created.
    SQL> select * from test2;
    N
    Y
    SQL> select * from test2 where name ='Y'; it's working
    N
    Y
    SQL> select * from test2 where name like 'Y'; it's working
    N
    Y
    Database Details
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET WE8MSWIN1252
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.2.0.1.0
    Why it's happening. Whehter check constraint is valid or not in Equallity operator and like and in .
    Whereever we using single character column with check constraint,it's working with Equality operator and like and in.
    IT'S WORKING FINE WITHOUT CHECK CONSTRAINTS.WE HAVE TWO AIX MACHINES WITH ORACLE10G.THE SAME PROBLEM OCCURING IN TWO MACHINES
    PLEASE HELP ME .
    THANK YOU,
    WITH REGARDS,
    N.VINODH

    h
    Edited by: user3266490 on Dec 3, 2008 2:30 AM

  • Problem with check constraint in mysql

    I am using mysql v8.14 and I have a problem on CHECK which is given below. I want to insert just 'friends' and 'all' on privacy attribute
    but mysql inserts everything.
    Can anyone help me, please? Thanks
    CREATE TABLE `customer`
    `cid` NUMERIC(6),
    `cname` VARCHAR(25),
    `password` VARCHAR(6),
    `email` VARCHAR(25),
    `phone` NUMERIC(12),
    `privacy` VARCHAR(10),
    PRIMARY KEY (`cid`),
    CHECK (`privacy`= `friends` OR `privacy`= `all`)
    );

    I am not familiar with MySQL syntax, but I would offer this observation:
    In your definition of the check constraint:
    CHECK (`privacy`= `friends` OR `privacy`= `all`)you are using the same delimiters (`) around both your column names and your literals. Is that correct?
    i.e. in Oracle I would use
    CHECK(privacy = 'friends' OR privacy = 'all')because privacy is not a literal, it is a column name.
    Is your syntax correct?

  • Error while adding a new col with check constriant

    Hello
    I tried adding a new column with check constraint but giving the error please correct me..
    drop table testchk
    create table testchk(typenm varchar2(5))
    insert into testchk values('mon')
    alter table testchk add typechk varchar2(5) default 'both' constraint chk_test check(typechk in('m','d') and typechk is not null)For the alter comman getting the ORA-02293 cannot validate error..
    I dont want to create any other constriant like not null etc .. but need only one check constriant
    Thanks

    You cannot assign a default value = 'both' while the constraint allows only 'm' or 'd'.
    This will work:
    ALTER TABLE testchk ADD typechk VARCHAR2(5) DEFAULT 'both'
    CONSTRAINT chk_test CHECK(typechk IN('m','d', 'both') AND typechk IS NOT NULL);Edited by: kordirko on 2010-05-14 18:41

  • Check constraint generation in physical model in 3.1.1.

    My question: Is it possible to set Use Domain Constraints ticked as default (or another way to get them in DDL) if the Domain with Check constraint is set for the column. I assume it's logical as if I bind a column to the domain then use the domain constraint as default policy. It's not a big deal if you have a few but in my case I do re-modelling just for physical model level and I have tens column in the tables based on a domain. So, I have first to set the domain as a column type and then in another screen tick Use Domain Constraints
    Thank you

    Hi,
    Is it possible to set Use Domain Constraints ticked as default (or another way to get them in DDL) if the Domain with Check constraint is set for the column.No it's not possible I logged bug for that.
    So, I have first to set the domain as a column type How do you set domain as data type? Do you have more than one columns using the same domain? In such cases you can use domain dialog (in the browser) and "Used in" page in order to assign domain to several columns/attributes at once.
    You can use the script below to set use domain constraints on columns that use domain as data type
    Philip
    var model;
    tables = model.getTableSet().toArray();
    for (var t = 0; t<tables.length;t++){
    table = tables[t];
    columns = table.getElements();
    for (var i = 0; i < columns.length; i++) {
         column = columns;
         if(column.getUse() == 0 && column.getDomain()!=null){
              if(!column.getUseDomainConstraints()){
                   column.setUseDomainConstraints(true);
                   table.setDirty(true);

  • Check constraint from domain missing after generation

    Hi,
    I've got the following problem with designer 10g. When I create a column and specify a specific domain, then generate the scripts for 10g (or 8i,9,...) the check constraints that is specified in the domain goes missing. The strange part is that we have about 50 domains and 49 of them work perfect but one of them just doesn't want to be generated. I've been comparing the domain to the others but I don't see any major differences that would cause the problem. Anyone know what could cause the problem or where I should (I think it is somewhere in the design & generate part) ?
    Help would be greatly appreciated.
    Grtz
    Message was edited by:
    Yves C

    Kent,
    in the DM v3.3.0.747 I have defined domains using value lists that lets you specify data values for the domain instead of define a check constraint, example Domain Name: "YesNo" and Value List -> "Y", "N".
    After adding a new column and set with the domain created, I force to apply the standard names to table with the button "Naming Rules", and the constraint created is correctly named . Notice that I need to force to apply the standard names because by default these constraints are created without name.
    Now I checked create a domain with check constraint definition for 11g (instead of using a list of values) and the behavior was the same.
    I recently upgraded to version 4.0EA2 and it works in the same way for both, so see if forcing to apply the "naming rules" solves your issue.
    Regards.
    Ariel.

  • Is it possible to create a dynamic(with a select) check constraint?

    create table a (col_to_be_coded_fora number);
    create table b (col_to_be_coded_forb number);
    create table c (col_name varchar2(20), col_code number, col_desc varchar2(20));
    insert into c values ('col_to_be_coded_fora', 1, 'active');
    insert into c values ('col_to_be_coded_fora', 2, 'de-active');
    insert into c values ('col_to_be_coded_fora', 3, 'pending');
    insert into c values ('col_to_be_coded_forb', 10, 'school');
    insert into c values ('col_to_be_coded_forb', 20, 'hospital');
    insert into a values ( 1); -- meaning 'active' for table a, column col_to_be_coded_fora, can go in
    insert into a values (10); -- meaning nothing for table a, column col_to_be_coded_fora, must give error
    insert into b values ( 1); -- meaning nothing for table b, column col_to_be_coded_forb, must give error
    insert into b values (10); -- meaning 'school' for table b, column col_to_be_coded_fora, can go in
    I know i can handle this problem with dividing table c into to tables and creating foreign key relationship.
    in this demo case i have only a and b, 2 tables but i want to encode thousands of tables with a table like c.
    &#304;s it possible to create a dynamic check constraint on a table which selects c table for the inputs that have permision?
    Or do i have to use after insert, update triggers on table a and b to ensure this functionality?
    Is there a smarter implementation for this need, may be a design change?
    Thank you,
    Kind regards.
    Tonguç

    Hi Tonguç,
    A small design change makes it possible to do this with simple foreign key constraints.
    I would do something like:
    ual303@ORKDEV01> CREATE TABLE c (
      2    col_name VARCHAR2(20),
      3     col_code NUMBER,
      4     col_desc VARCHAR2(20),
      5     PRIMARY KEY (col_name, col_code)
      6  );
    Tabel is aangemaakt.
    ual303@ORKDEV01> CREATE TABLE a (
      2    col_to_be_coded_fora NUMBER PRIMARY KEY,
      3     col_name VARCHAR2(20) DEFAULT 'col_to_be_coded_fora' CHECK (col_name = 'col_to_be_coded_fora'),
      4     FOREIGN KEY (col_name, col_to_be_coded_fora) REFERENCES c
      5  );
    Tabel is aangemaakt.
    ual303@ORKDEV01> CREATE TABLE b (
      2    col_to_be_coded_forb NUMBER PRIMARY KEY,
      3     col_name VARCHAR2(20) DEFAULT 'col_to_be_coded_forb' CHECK (col_name = 'col_to_be_coded_forb'),
      4     FOREIGN KEY (col_name, col_to_be_coded_forb) REFERENCES c
      5  );
    Tabel is aangemaakt.
    ual303@ORKDEV01> insert into c values ('col_to_be_coded_fora', 1, 'active');
    1 rij is aangemaakt.
    ual303@ORKDEV01> insert into c values ('col_to_be_coded_fora', 2, 'de-active');
    1 rij is aangemaakt.
    ual303@ORKDEV01> insert into c values ('col_to_be_coded_fora', 3, 'pending');
    1 rij is aangemaakt.
    ual303@ORKDEV01> insert into c values ('col_to_be_coded_forb', 10, 'school');
    1 rij is aangemaakt.
    ual303@ORKDEV01> insert into c values ('col_to_be_coded_forb', 20, 'hospital');
    1 rij is aangemaakt.
    ual303@ORKDEV01> -- meaning 'active' for table a, column col_to_be_coded_fora, can go in
    ual303@ORKDEV01> insert into a(col_to_be_coded_fora) values ( 1);
    1 rij is aangemaakt.
    ual303@ORKDEV01> -- meaning nothing for table a, column col_to_be_coded_fora, must give error
    ual303@ORKDEV01> insert into a(col_to_be_coded_fora) values (10);
    insert into a(col_to_be_coded_fora) values (10)
    FOUT in regel 1:
    .ORA-02291: integrity constraint (UAL303.SYS_C0033537) violated - parent key not found
    ual303@ORKDEV01> -- meaning nothing for table b, column col_to_be_coded_forb, must give error
    ual303@ORKDEV01> insert into b(col_to_be_coded_forb) values ( 1);
    insert into b(col_to_be_coded_forb) values ( 1)
    FOUT in regel 1:
    .ORA-02291: integrity constraint (UAL303.SYS_C0033540) violated - parent key not found
    ual303@ORKDEV01> -- meaning 'school' for table b, column col_to_be_coded_fora, can go in
    ual303@ORKDEV01> insert into b(col_to_be_coded_forb) values (10);
    1 rij is aangemaakt.
    ual303@ORKDEV01>Cheers,
    Colin

  • EA2: Code is generated for only one column with Domain check constraint.

    I created a Domain with a Value List (Y or N - Yes or No) and used that domain for two columns in the same table. But for only one column (the last one) the check appears in the generated DDL.
    After I enabled the "Use Domain Constraints" both checks appear in the DDL, but one as an inline check constraint and one as an "Alter table add contraint.."
    Once I changed the naming Template for the check constraint, both constraints are generated as an Alter table clause. The inline check constraint is only generated when the name of the constraint (according to the template) is too long. It would be nice if I could choose if I want an inline or a separate check constraint definition.
    Edited by: Roel on Nov 23, 2010 11:55 AM
    Edited by: Roel on Nov 23, 2010 12:02 PM

    I logged ER for that
    Philip

  • Help with a check constraint

    I have inadvertantly posted this in the wrong section, so I am reposting this in the SQL section and marking this one as answered.
    Hi,
    I have a question regarding creating a constraint against two tables. I have an FK in table_A that should check the constraint against two related tables. Table_A is the table that holds the FK and tables B and C hold the PK back to table A. The problem is with my constraint FK I receive the message ORA-02251: subquery not allowed here. I need to ensure that the AFK contains the FK value that is in either TABLE_B or TABLE_C .
    In my create statement I have
    CREATE TABLE TABLE_A
         (_PK INTEGER NOT NULL ENABLE,
         _FK INTEGER NOT NULL ENABLE,
         CONSTRAINT A__PK PRIMARY KEY (_PK) ENABLE,
         CONSTRAINT A__FK CHECK (_FK IN (SELECT FK FROM TABLEB UNION SELECT FK FROM TABLEC)) ENABLE
    Thanks
    Edited by: user11947229 on Oct 10, 2009 11:43 AM

    "FK value that is in either TABLE_B or TABLE_C"
    This is exactly what is not constraint! Constraint is against one object not set of objects like in your case.

  • Crash of Oracle XE when check constraint uses in-operator with desc. values

    ORA-03113 and other errors in conjunction with lost of connection occur in Oracle XE under the following conditions:
    /* Crash (values of check constraint in descending order) */
    DROP TABLE CRASHTEST CASCADE CONSTRAINTS;
    CREATE TABLE CRASHTEST
    CRASHTEST_ID NUMBER(9),
    CRASHTEST_OK NUMBER(1) DEFAULT 0
    ALTER TABLE CRASHTEST ADD (CONSTRAINT CRASHTEST_CK CHECK (CRASHTEST_OK IN (0,-1)));
    INSERT INTO CRASHTEST (CRASHTEST_ID, CRASHTEST_OK) VALUES (1, 0);
    INSERT INTO CRASHTEST (CRASHTEST_ID, CRASHTEST_OK) VALUES (2, -1);
    COMMIT;
    SELECT * FROM CRASHTEST WHERE CRASHTEST_OK = 0;
    If all values of the in-clause within the check constraint are entered in ascending order, no error occurs:
    /* No Crash (values of check constraint in ascending order) */
    DROP TABLE CRASHTEST CASCADE CONSTRAINTS;
    CREATE TABLE CRASHTEST
    CRASHTEST_ID NUMBER(9),
    CRASHTEST_OK NUMBER(1) DEFAULT 0
    ALTER TABLE CRASHTEST ADD (CONSTRAINT CRASHTEST_CK CHECK (CRASHTEST_OK IN (-1,0)));
    INSERT INTO CRASHTEST (CRASHTEST_ID, CRASHTEST_OK) VALUES (1, 0);
    INSERT INTO CRASHTEST (CRASHTEST_ID, CRASHTEST_OK) VALUES (2, -1);
    COMMIT;
    SELECT * FROM CRASHTEST WHERE CRASHTEST_OK = 0;
    Especially interesting is the fact, that the error is caused by a check constraint in conjunction with a select statement!
    Hopefully, there are no other hidden bombs stealing my time...
    Have a nice day,
    Sven

    It might be interesting to post that in the XE forum to notify Oracle developers and XE users.
    Oracle Database Express Edition (XE)
    C.

  • 10g 10.2.0.1.0 - Check Constraint with negative values possibly BUG.

    Hello,
    Why this doesn't work ?
    create table a (b numeric(1));
    alter table a
    add constraint b CHECK (b in (0, 1, -1)) ENABLE;
    select * from a where b = -1;
    I get the following error: java.sql.SQLException: No more data to read from socket
    - Through the jdbc client. It happens with the Oracle Client too.
    When i change my check constraint to this:
    alter table a
    add constraint b CHECK (b in (-1, 0, 1)) ENABLE;
    It works.
    It's a (known) bug ?
    Regards,
    Francisco

    hi dear,
    I want to upgrade my OMS server 10.2.0.1 to 10.2.0.5
    I downloaded the patch 10.2.0.5 and read the README.txt
    Part of the README is:
    1.2 Enter the following command to extract the installation files:
    $ unzip GridControl_10.2.0.5_<platform name>.zip
    This command extracts the following files and directory:
    |- p3731593_10205_<platform name>.zip
    |- 3731596.zip
    |- 3822442.zip
    |- README.txt
    |- doc/
    NOTE: <platform name> will be "LINUX" or "Win32" depending on the platform for which you are installing. For installing Enterprise Manager 10g Grid Control Release 5 (10.2.0.5), refer to the Release Notes available in the "doc" directory.
    - p3731593_10205_<platform name>.zip is the ZIP file that contains 10.2.0.5 patch set software.
    This zip can be used for:
    - Upgrading Oracle Management Service Release 2 (10.2.0.x) or higher to Oracle Management Service Release 5 (10.2.0.5)
    - Upgrading Oracle Management Repository (sysman schema)
    - Upgrading Oracle Management Agent on the host where OMS is running.
    NOTE: This will not upgrade the database in which the Management Repository (sysman schema) resides.
    - 3731596.zip is for patching Management Agent by staging the patch set. To understand how you can apply the Management Agent 10.2.0.5 patch set, refer to method 2 described in section 4.3.3 "Upgrading Management Agent - Multiple Hosts at a Time" of the Release Notes. The Release Notes can be found in the "doc" directory.
    - 3822442.zip is for patching Management Agent by distributing the full patch set.  To understand how to apply the Management Agent 10.2.0.5 patch set, refer to method 1 described in section 4.3.3 "Upgrading Management Agent - Multiple Hosts at a Time" of the Release Notes. The Release Notes can be found in the "doc" directory.3731596.zip - by staging
    3822442.zip - by distributing
    Does the two above have the same function or purpose?
    I can not understand the meaning of the two :( . which do you think is the right one for my setup?
    Thanks a lot

  • Creating a check constraint with a join

    Hi,
    is it possible to create a check constraint under the data models using a join on lookup table?
    I would like to filter out tuples in the target table involving conditions from an another table.
    Regards

    Numbers has checkable boxes but they don't work once exported to PDF.
    And there is iBooks Author as well which can create ePubs.
    If it is just for yourself on your Mac I highly recommend Qu-s.
    Peter

  • Adding a check constraint

    Hi,
    I wish to add a CHECK constraint checking for the presence of '@' symbol on a column with email ids.How to set it . Please guide.

    ALTER TABLE testmail
    ADD CONSTRAINT chk_email_id CHECK
    (REGEXP_LIKE(mail_id, '[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}'));

  • Primary key and relevant not null check constraints....

    Hi ,
    There are some constraints of primary key type and not null check constraints on columns which constitute each primary key....
    Should I/Do I have to drop them....????
    Do they burden the db at the time of data validation....????
    Thanks...
    Sim

    Hi,
    >>There are some constraints of primary key type and not null check constraints on columns which constitute each primary key..
    In fact, a column that constitutes a primary key, by default cannot accept NULL values. In this case, defines a PK column as NOT NULL would not be necessary.
    LEGATTI@ORACLE10> create table x (id number constraint pk_x primary key);
    Table created.
    LEGATTI@ORACLE10> desc x
    Name                  Null?    Type
    ID                    NOT NULL NUMBER
    LEGATTI@ORACLE10> select constraint_name,constraint_type,table_name,search_condition from user_constraints where table_name='X';
    CONSTRAINT_NAME                C TABLE_NAME      SEARCH_CONDITION                
    PK_X                           P X
    LEGATTI@ORACLE10> create table y (id number not null constraint pk_y primary key);
    Table created.
    LEGATTI@ORACLE10> desc y
    Name                  Null?    Type
    ID                   NOT NULL NUMBER
    LEGATTI@ORACLE10> select constraint_name,constraint_type,table_name,search_condition from user_constraints where table_name='Y';
    CONSTRAINT_NAME                C TABLE_NAME      SEARCH_CONDITION
    SYS_C006327381 C Y "ID" IS NOT NULL 
    PK_Y                           P Y
    LEGATTI@ORACLE10> alter table y drop constraint SYS_C006327381;
    Table altered.
    LEGATTI@ORACLE10> desc y
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBER
    LEGATTI@ORACLE10> insert into y values (NULL);
    insert into y values (NULL)
    ERROR at line 1:
    ORA-01400: cannot insert NULL into ("LEGATTI"."Y"."ID")
    LEGATTI@ORACLE10> insert into y values (1);
    1 row created.
    LEGATTI@ORACLE10> insert into y values (1);
    insert into y values (1)
    ERROR at line 1:
    ORA-00001: unique constraint (LEGATTI.PK_Y) violated
    >>Should I/Do I have to drop them....????
    I don't see any problem, otherwise, drop the NOT NULL constraint is the same with alter the column table like below:
    LEGATTI@ORACLE10> create table z (id number not null constraint pk_z primary key);
    Table created.
    LEGATTI@ORACLE10> select constraint_name,constraint_type,table_name,search_condition from user_constraints where table_name='Z';
    CONSTRAINT_NAME                C TABLE_NAME                     SEARCH_CONDITION
    SYS_C006328420 C Z "ID" IS NOT NULL
    PK_Z                           P Z
    LEGATTI@ORACLE10> desc z
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBER
    LEGATTI@ORACLE10> alter table z modify id NULL;
    Table altered.
    LEGATTI@ORACLE10> select constraint_name,constraint_type,table_name,search_condition from user_constraints where table_name='Z';
    CONSTRAINT_NAME                C TABLE_NAME                     SEARCH_CONDITION
    PK_Z                           P Z
    LEGATTI@ORACLE10> desc z
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBERCheers
    Legatti

  • What is the use for CREATING VIEW WITH CHECK OPTION?

    Dear Legends,
    I have a doubt
    What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.
    A: Enforcing constraints at DB level.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???
    Please clear my doubt's Legends
    Lots of Thanks....
    Regards,
    Karthik

    Hi, Karthick,
    karthiksingh_dba wrote:
    ... What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..Most views are created and used for convenience. A view is a saved query. If the same operations are often done, then it can be very convenient to code those operations once, in a view, and refer to the view rather than explicitly doing those operations.
    Sometimes, views are created and used for security reasons. For example, you many want to allow some users to see only certain rows or certain columns of a table.
    Views are necessary for INSTEAD OF triggers.
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.The reason is integrity, not necessarily referential integrity. The CHECK option applies only when DML is done through the view. It prohibits certain changes. For example, if a user can't see certain rows through a view, the CHECK option keeps the user from creating such rows.
    A: Enforcing constraints at DB level.I'm not sure what you mean. Please give an example.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??No. Using CHECK OPTION, you can do some inserts and updates, but not others. The columns involved may or may not have constraints in either case.
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???If you try to violate a constraint, you'll get an error. That happens in views with or without the CHECK OPTION, and also in tables.

Maybe you are looking for

  • "Error -2147352573 occured at Member not found" when trying to open an excel template

    I'm trying to open an excel document as a template using the report generation tools but coming up with this error.  I've traced the error to NI_ReportGenerationToolkit.lvlib:Excel_Open_Workbook.vi but have to idea why it's happening.  The document s

  • Change Plant in SAles order..

    Hi, I'm trying to change the plant in sales order Tcode :Va02->Fast change of -->Plant. Though the plant is enabled when i change it gives me a message "Item:......Plant cannot be copied". Can anybody help me in changing this.Is there any userexit or

  • Screen Savers That Work While Listening To Music

    HI, i'm having a hard time find a simple "screenblanker"(mabye text or a clock) screensaver saver that I can have on while listening to music. My problem is all the apple original screen savers, they all turn off when I ajust my music volume! And i d

  • I am  unable to load GRAPHIC files using the transaction SFP.

    I am  unable to load GRAPHIC files using the transaction SFP. The error message says that there is no connection to the below given url.    http://<hostname:8000>/sap/bc/fp/ is it something like i have to activate this service in transaction sicf ?

  • Regarding SAP Tcode

    Hi, We are in the process of upgrading SAP 4.6 to ECC 6.0. We are trying to map the Transaction codes that were used in the last one year in 4.6 systems to the Business Processes. Is there a site where in I can enter my Transaction code and can find