primary key constraint...

Hi all

I have a table 'employees' on 'hr' scheme, now, I created a user 'rahul' on the same database and pulling a request by logging in with the user "rahul" which is:

create table rahul.employees
as (select * from hr.employees); -ps: I have the privilege to read data from hr.employees

Now, the above query works fine, the only issue is that employe_id is the primary key for the table hr.employees and when I check the table of rahul.employees, the pruimary key constraint is missing, however the structure of the table and the data is there according to my expectations.

I so want to know how to create a table with data using the definition of schema_name.table_name as well as the primary key constraint.

Concerning
Rahul karou

Mac_Freak_Rahul wrote:
Thanks for the reply, but this query returns me nothing, is it a question of privilege?

Concerning
Rahul

Are you an error? Otherwise, the result will be CLOB, just copy from your clint tool and paste it into a Notepad...

between it's table

CREATE TABLE "HR"."EMPLOYEES1"
   (     "EMPLOYEE_ID" NUMBER(6,0),
     "FIRST_NAME" VARCHAR2(20),
     "LAST_NAME" VARCHAR2(25) CONSTRAINT "EMP_LAST_NAME_NN" NOT NULL ENABLE,
     "EMAIL" VARCHAR2(25) CONSTRAINT "EMP_EMAIL_NN" NOT NULL ENABLE,
     "PHONE_NUMBER" VARCHAR2(20),
     "HIRE_DATE" DATE CONSTRAINT "EMP_HIRE_DATE_NN" NOT NULL ENABLE,
     "JOB_ID" VARCHAR2(10) CONSTRAINT "EMP_JOB_NN" NOT NULL ENABLE,
     "SALARY" NUMBER(8,2),
     "COMMISSION_PCT" NUMBER(2,2),
     "MANAGER_ID" NUMBER(6,0),
     "DEPARTMENT_ID" NUMBER(4,0),
      CONSTRAINT "EMP_SALARY_MIN" CHECK (salary > 0) ENABLE,
      CONSTRAINT "EMP_EMAIL_UK" UNIQUE ("EMAIL")
  USING INDEX  ENABLE,
      CONSTRAINT "EMP_EMP_ID_PK" PRIMARY KEY ("EMPLOYEE_ID")
  USING INDEX ENABLE,
      CONSTRAINT "EMP_MANAGER_FK" FOREIGN KEY ("MANAGER_ID")
       REFERENCES "HR"."EMPLOYEES" ("EMPLOYEE_ID") ENABLE,
      CONSTRAINT "EMP_JOB_FK" FOREIGN KEY ("JOB_ID")
       REFERENCES "HR"."JOBS" ("JOB_ID") ENABLE,
      CONSTRAINT "EMP_DEPT_FK" FOREIGN KEY ("DEPARTMENT_ID")
       REFERENCES "HR"."DEPARTMENTS" ("DEPARTMENT_ID") ENABLE
   ) 

Tags: Database

Similar Questions

  • changing column addition of primary key constraint

    How to change a table and edit a column and add a primary key constraint?

    987018 wrote:
    can add us a primary key constraint by using the command Edit?

    If the column already exists, and there is no existing primary key, then

    SQL> create table t (id number, descr varchar2(10));
    
    Table created.
    
    SQL> alter table t modify (id not null primary key);
    
    Table altered.
    

    If the column does not exist yet and there is no primary key, then:

    SQL> create table t1 (descr varchar2(10));
    
    Table created.
    
    SQL> alter table t1 add (id number not null primary key);
    
    Table altered.
    

    John

  • modify a primary key constraint

    Hello

    I start with oracle, and I have two doubts which cannot handle after a search on the internet.

    1. it is possible to do an ALTER TABLE for a DEFAULT CONSTRAINT?. Maybe you think that the question should be in a different way like this: oracle database takes the default condition as a constraint?. As far as I know, not done that.

    2. it is possible, with an ALTER TABLE to CHANGE a CONSTRAINT of a PRIMARY KEY, to add another field more?

    I searched the internet, but I have not found a clear answer. I use oracle 10g express edition.


    Thank you very much.

    P.D.:sorry for my English, it is not very good.

    #2-you can not 'add a column to the primary key of a table constraint' with a single ALTER, but you can delete and re-create the constraint primary key (including the additional column).

    13:25:26> create table t1 (a number primary key, b number, c number );
    
    Table created.
    
    Elapsed: 00:00:00.09
    13:25:46> alter table t1 drop primary key;
    
    Table altered.
    
    Elapsed: 00:00:00.06
    13:25:47> alter table t1 add primary key (a,b);
    
    Table altered.
    
    Elapsed: 00:00:00.09
    

    But you will not be able to drop the primary key of a table index.

    13:25:47> create table t2 (a number primary key, b number, c number ) organization index;
    
    Table created.
    
    Elapsed: 00:00:00.03
    13:25:59> alter table t2 drop primary key;
    alter table t2 drop primary key
    *
    ERROR at line 1:
    ORA-25188: cannot drop/disable/defer the primary key constraint for
    index-organized tables or sorted hash cluster
    
    Elapsed: 00:00:00.00
    13:25:59> 
    

    #1-I'm not sure I understand your question, but you can change a table column to have a default value. This isn't a "constraint", but a default value. It has an effect when you perform an insert which does not include this column.

    13:31:23> alter table t1 modify (c default 3.14);
    
    Table altered.
    
    Elapsed: 00:00:00.04
    13:31:24> insert into t1 (a,b,c) values (1,2,3);
    
    1 row created.
    
    Elapsed: 00:00:00.01
    13:31:24> insert into t1 (a,b,c) values (4,5,NULL);
    
    1 row created.
    
    Elapsed: 00:00:00.00
    13:31:24> insert into t1 (a,b) values(6,7);
    
    1 row created.
    
    Elapsed: 00:00:00.01
    13:31:24> select * from t1;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
             4          5
             6          7       3.14
    
    3 rows selected.
    
    Elapsed: 00:00:00.18
    
  • Removal of cascade of primary key constraints

    I have 3 tables. P_1 = primary key

    P_2 P_1 and P_3 reference reference P-2 referencing P_1 column.

    I dropped the PK on P_1 constraint with the cascade option. However P_3 always reference P_1.

    I thought that this was the case when I started.

    May sound like a stupid question as how I already tried, but when I delete a constraint of Pk, a 3rd table referencing a second column in tables referring to the original column that has the constraint of PK, this 3rd column will retain its FK reference at the second table... ?

    I remember reading somewhere on what is true, that at least I am sure that I read in one of the oradocs, I just want to ask.

    Thank you.

    To make it very simple thinks this way...

    Since then, you drop PK of 1 table only means that the link between the 1st and the 2nd table is broken, but that does not drop the pharmacokinetics of the 2nd table... Also the link between the 2nd and the 3rd table is intact...

    So yes, 3rd table will maintain the relationship of FK to the 2nd table.

    Hope that's clear...

  • Add primary key constraint

    What will happen if I do this?

    ALTER table emp
    Add primart key (employee_id, last_name);

    It's going to be two primary keys in the table?
    or what?

    987018 wrote:
    What will happen if I do this?

    ALTER table emp
    Add primart key (employee_id, last_name);

    It's going to be two primary keys in the table?
    or what?

    It will come with an error, unless you change "primart' primary '.

    If you do, you'll get a primary key that requires a combination of the two columns to be unique.

    So, you can insert two rows with the same id of employee but different names! Not a good idea.

    Simply use a code that is used as the primary key.

    Note: you can have only one primary key for a table, but you can have many unique constraints.

  • by specifying the index tablespace in to disable the primary key constraint

    Hello
    during the ETL I want to disable constraints PK/UK to speed up the load;
    on activation of the constraint, the corresponding indices are created in a different tablespace while they were initially on the creation of the table itself
    I tried to disable PK / UK with the option 'keep the index', the index value corresponding to the status of "unusable" and use ' alter session set skip_unusable_indexes = true', but then I can't insert rows with the error.
    Error: ORA-01502: index 'xxx' or partition of such index is in unusable state
    can anyone tell if there is a way to allow the PK/UK constraint and specify the storage space for the corresponding indices, or keep the index and inserts works?
    I'd like to avoid to drop constraints / indexes and re-create them both from scratch after the load
    Thank you for the advice
    Thank you
    Rgds

    >
    can anyone tell if there is a way to allow the PK/UK constraint and specify the storage space for the corresponding indices, or keep the index and inserts works?
    I'd like to avoid to drop constraints / indexes and re-create them both from scratch after the load
    >
    Have you tried specifying the table space in the USING clause when you activate the constraint?

    ALTER TABLE emp ENABLE PRIMARY KEY USING INDEX TABLESPACE myTS;
    

    See DBA guide
    http://docs.Oracle.com/CD/B28359_01/server.111/b28310/indexes003.htm
    >
    Creating an Index associated with a constraint

    Oracle database applies a UNIQUE key or a constraint integrity PRIMARY KEY on a table by creating a unique index on the unique key or primary key. This index is created automatically by the database when the constraint is enabled. No action is required by you when you run the CREATE TABLE or ALTER TABLE statement to create the index, but you can optionally specify an ESCALATION using clause to exercise control over his creation. This includes them when a constraint is defined and enabled, and when a constraint defined but disabled is selected.
    >
    Note the last sentence two sentences:
    >
    You can optionally specify an ESCALATION using clause to exercise control over his creation. This includes them when a constraint is defined and enabled, and when a constraint defined but disabled is selected.
    >
    You realize, I hope, that the only way can Oracle KNOWS that the index contains valid values is to rebuild?

  • blocking because of the primary key constraint

    Hi all

    Recently, we migrated to 9.2.0.4 to 10.2.0.4. In the new version of oracle there was a strange behavior, we have 200 + oracle database user and there was too much blocking on a particular one table, we looked and looked for the cause but found nothing exact reason, then on the internet somewhere, we found that if a primary key is disabled and no there is also foreign then blocking is caused for example

    CREATE TABLE TEST_MST
    (
    MST_COL1 NUMBER,
    MST_COL2 NUMBER,
    MST_COL3 NUMBER
    )

    CREATE TABLE TEST_DTL
    (
    MST_COL1 NUMBER,
    MST_COL2 NUMBER,
    MST_COL3 NUMBER,
    DTL_COL1 NUMBER,
    DTL_COL2 NUMBER,
    DTL_COL3 NUMBER
    )

    ALTER TABLE TEST_MST ADD)
    CONSTRAINT PK_TM
    KEY ELEMENTARY SCHOOL
    (MST_COL1, MST_COL2, MST_COL3)) ;

    ALTER TABLE TEST_DTL ADD)
    CONSTRAINT PK_TD
    KEY ELEMENTARY SCHOOL
    (MST_COL1, MST_COL2, MST_COL3, DTL_COL1, DTL_COL2)) ;

    ALTER TABLE TEST_DTL ADD)
    CONSTRAINT FK_TM_TD
    FOREIGN KEY (MST_COL1, MST_COL2, MST_COL3)
    REFERENCES TEST_MST (MST_COL1, MST_COL2, MST_COL3));

    ALTER TABLE TEST_DTL
    DISABLE THE CONSTRAINT PK_TD;


    so, I just want to be sure that's the exact reason only blocking sessions and if yes, then why not so happning.

    Thanks and Rgds,
    Piyush
  • Not Null on the column of a primary key constraint

    I came across a table defined in the same way to...

    create table t (t_id int constraint nn_t_id not null constraint pk_t primary, data key number);

    Of course, the primary key is the is not null, then is there a reason to add the redundant constraint not null?

    There are two parts to your question, I think:

    (1) why add a NOT NULL if a primary key is also reported.
    (2) why is null is NOT a name defined by the user (in this case nn_t_id).

    1 > I think you are right: there is no difference in behavior in the way that Oracle is going to reject the creation of NULL in this column (whether through the direct insert or update with a NULL value). I personally always declares the NOT NULL for columns, I know to never have null, regardless of whether the column is (member of) a PK.

    It's pretty funny, btw, the SQL standard as chosen able to be the NULL default value. I think that we all type much less, if the SQL standard chose NOT NULL default value. But that's another story.

    2 > I don't see given nullability defined by the user of the explicit names now and then, because of some "coding guideline' which dictates that constraint names must never be generated System. This guideline is often presented as a result of the exception handling of "client-side", where the constraint name is filtered SQLERRM and then more personalized to be displayed to the end user. However for NOT NULL constraint violations, I think (does not fully to check) that you are always thrown an ORA-01400 is an ORA-01407. Who nowadays both will tell you exactly (in SQLERRM) which column of this table is currently in violation of a NOT NULL constraint.

    Toon

  • Order columns (which make up the primary key constraint) matter in where clause of DML query for use of indexing mechanism to operate.

    Version of DB: database Oracle 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production


    I have a table my_table as below:
    create table my_table
    (
    my_code varchar2 (6).
    my_id varchar2 (24).
    forced pk_1 primary key (my_code, my_id)
    );


    Primary_key here's a composite key that contains columns 1 (my_code) and 2 (my_id).
    Is there that a difference in the way below queries is executed in terms of performance (use of indexing in the extraction).

    (a) select * from my_table where my_code = '123' and my_id = "456";
    (b) select * from my_table where my_id = '456' and my_code = '123';


    The understanding I have the order of the column in the where clause should be identical to the sequence in
    What primary key draws for indexing to be used by oracle in oracle other DML queries ignores indexing
    However when I used explain plain both show the same query cost with single scan with index rowid.
    so I don't know if I'm wrong in the concept that I have. Kindly help.

    Thanks in advance,
    Gerard

    Your question is answered in the Performance Tuning Guide

    Using indexes and clusters

    14.1.4 choosing composite indexes

    A composite index contains several key columns. Composite indexes can provide additional benefits compared to the index to single column:

    • Improved selectivity

      Sometimes the two or more columns or expressions, each with a low selectivity can be combined to form a composite with a high selectivity.

    • Reduced IO

      If all columns selected by a query are a composite index, then Oracle may return these values in the index without access to the table.

    A SQL statement can use a path on a composite index if the statement contains constructions that use a main part of the index.

    Note:

    This is no longer the case with the skip index scans. See "Index Skip Scans".

    A main part of an index is a set of one or more columns that have been specified first and consecutively in the list of columns in the CREATE INDEX statement that created the index.

  • Two constraints of primary key of a table with two different constraint name

    Hi guys

    I am creating the table below

    Table name: TITLE_COPY

    Column name Copy_id Title_id Status

    Key type

    PKPK, FK
    UniqueNN, UNN, UNN
    CheckAvailable, destroyed, leased, reserved
    Table Ref FKTitle
    FK Ref ColTitle_id
    Data typeNumberNumberVarchar2
    Length101015

    The SQL statement below can create it

    CREATE TABLE title_copy (copy_id NUMBER (10),)

    title_id CONSTRAINT NUMBER (10) title_copy_title_id_fk title (title_id) REFERENCES.

    primary key constraint title_copy_title_id_pk title_id (copy_id)

    status VARCHAR2 (15) NOT NULL CONSTRAINT status_ck CHECK (status IN ('AVAILABLE', 'DESTROYED', 'RENTAL', 'RESERVED'))

    );

    Two primary keys (title_id, copy_id) are created with the same name of constraint (title_copy_title_id_pk) (-> table-level constraint). What happens if I want to have two different names of the primary key constraint, say title_copy_title_id_pk for the title_id column and title_copy_copy_id_pk for the copy_id column?

    I can do that with a column-level constraint? Something like below (complains about the additional primary key)

    CREATE TABLE title_copy (copy_id NUMBER (10) CONSTRAINT title_copy_copy_id_pk PRIMARY KEY,)

    constraint title_copy_title_id_pk primary key (title_id).

    title_id CONSTRAINT NUMBER (10) title_copy_title_id_fk title (title_id) REFERENCES.

    status VARCHAR2 (15) NOT NULL CONSTRAINT status_ck CHECK (status IN ('AVAILABLE', 'DESTROYED', 'RENTAL', 'RESERVED'))

    );

    In summary, I can define two primary keys with the name of different constraint in a column-level constraint?

    There are no two primary keys. There is a primary key made up of two columns - also called a composite key.

    A table can have at least a primary key. You can, if you wish, create a unique constraint on a different set of columns.

  • Difference between the immediate and normal constraint primary key value

    Hello
    I tried the following to understand the difference between immediate constraint set and the primary normal stress
    create table cust (cust_id number ,cust_name varchar2(25));
    
    alter table cust add constraint cust_id_pk primary key(cust_id)
    deferrable initially deferred;
    
    SQL> insert into cust values(1,'raj');
    
    1 row created.
    
    SQL> insert into cust values(1,'sam');
    
    1 row created.
    
    SQL> commit;
    commit
    *
    ERROR at line 1:
    ORA-02091: transaction rolled back
    ORA-00001: unique constraint (SCOTT.CUST_ID_PK) violated
    
    
    SQL> set constraint cust_id_pk immediate;
    
    Constraint set.
    
    SQL> 
    SQL> insert into cust values(1,'lata');
    
    1 row created.
    
    SQL> insert into cust values(1,'lata');
    insert into cust values(1,'lata')
    *
    ERROR at line 1:
    ORA-00001: unique constraint (SCOTT.CUST_ID_PK) violated
    The above error violation even works for a normal constraints primary / unique

    So what is the use of the command

    immediate Set constraint cust_id_pk;


    Thank you

    So what is the use of the command

    In fact, the use of the command when you're dealing with foreign key constraints. As explained below

     SQL>  create table cust (cust_id number ,cust_name varchar2(25), supplier_id number);
    
    Table created.
    
    SQL> create table supp(supplier_id number);
    
    Table created.
    
    SQL> alter table supp add primary key(supplier_id);
    
    Table altered.
    
    SQL>  ALTER TABLE cust ADD CONSTRAINT fk_cust_supp
      2    FOREIGN KEY (supplier_id)
      3    REFERENCES supp (supplier_id)
      4    DEFERRABLE
      5    INITIALLY deferred;
    
    Table altered.
    

    To insert a line in the cust table without entering Ref provider table supp

    SQL> insert into cust values(1,'raj',111);
    
    1 row created.
    

    Line by 1 created successfully (attention this validation is not yet done) because the foreign key constraint is initially deferred.

    Now

    SQL> set constraint fk_cust_supp immediate;
    set constraint fk_cust_supp immediate
    *
    ERROR at line 1:
    ORA-02291: integrity constraint (OWNER.FK_CUST_SUPP) violated - parent key not found
    

    Since Ref no outs in extra table so forced provider violated.

    allows to insert a row in the vendor corresponding with the vendor id in the cust table id

    SQL> insert into supp values(111);
    
    1 row created.
    

    Now, try

    SQL> set constraint fk_cust_supp immediate;
    
    Constraint set.
    

    but now, if you try to insert a row into the table cust without this vendor id in table supp, it give error (since now forced to check from the inserted row, even will not wait for commit)

    SQL>  insert into cust values(3,'bob',222);
     insert into cust values(3,'bob',222)
    *
    ERROR at line 1:
    ORA-02291: integrity constraint (OWNER.FK_CUST_SUPP) violated - parent key not found
    

    Also, in the case of primary key constraints will be checked when you perform VALIDATION, otherwise that it will allow you to insert the second row.

    SQL> alter table cust add constraint cust_id_pk primary key(cust_id)
      2  deferrable initially deferred;
    
    Table altered.
    
    SQL> insert into cust values(1,'raj');
    
    1 row created.
    
    SQL> insert into cust values(1,'sam');
    
    1 row created.
    
    SQL> insert into cust values(1,'bob');
    
    1 row created.
    
    SQL> commit;
    commit
    *
    ERROR at line 1:
    ORA-02091: transaction rolled back
    ORA-00001: unique constraint (OWNER.CUST_ID_PK) violated
    
    SQL> 
    
    SQL> drop table cust;
    
    Table dropped.
    
    SQL> create table cust (cust_id number ,cust_name varchar2(25));
    
    Table created.
    
    SQL> alter table cust add constraint cust_id_pk primary key(cust_id)
      2  deferrable initially deferred;
    
    Table altered.
    
    SQL> set constraint cust_id_pk immediate;
    
    Constraint set.
    
    SQL> insert into cust values(1,'raj');
    
    1 row created.
    
    SQL>  insert into cust values(1,'sam');
     insert into cust values(1,'sam')
    *
    ERROR at line 1:
    ORA-00001: unique constraint (OWNER.CUST_ID_PK) violated
    
    SQL> 
    

    Published by: Azhar Husain on July 27, 2011 12:01

  • create view materized without constraint primary key on the base table?

    Hello

    I tried to create a materized view, but I got this error:

    SQL > CREATE MATERIALIZED VIEW FAST REFRESH TABLE1_MV
    START BY
    TO_DATE (April 25, 2009 03:00:13 ',' DD-MM-YYYY hh24:mi:ss')
    NEXT
    SYSDATE + 1
    AS
    Select * from TABLE1@remote_db
    SQL > /.
    CREATE MATERIALIZED VIEW FAST REFRESH TABLE1_MV
    *
    ERROR on line 1:
    ORA-12014: table 'TABLE1' does not contain a primary key constraint.

    Table1 in remote_db is not a primary key constraint. Is there anyway that I can create a view materized on a base table that is not a primary key constraint?

    Thank you
    Liz

    Make sure user name used in remote_db database link has select privileges on Journal of MV. On the issue of db source:

    SELECT LOG_TABLE FROM DBA_MVIEW_LOGS WHERE LOG_OWNER = 'TABLE1-owner' AND MASTER = "TABLE1";

    This will give you MV table the journal name. On the issue of target side:

    SELECT * from MV-LOG-NAME@remote_db;

    And after your version.

    SY.

  • When I change a column is a primary key the associated non-unique index to become unique?

    So basically I already tried this and it shows me that the associated index is not unique.

    create table employees2 in select * from employees;

    create index emp_idx on employees2 (employee_id);

    ALTER employees2 table add primary key (employe_id) using index emp_idx;

    Select * from user_indexes where index-name = "EMP_IDX";

    I was wondering if I right assuming that when you change a column to a primary key or unique while using a given index that does not have the respective index become unique.

    The textbooks I use are sometimes a little hard to understand because of the wording, also, I want to just ask someone with a little more experience than me.

    Thank you.

    your test did give the correct answer: the index is not unique if it serves to bear a unique or primary key constraint. Indeed, it is one of the benefits of the use of no unique indexes in support of UK/PK constraints (since it allows to set the unusable index before to make bulk loads; and, of course, they have also some disadvantages - for example, they need an additional logical reading to reach a line). Richard Foote explains the details in https://richardfoote.wordpress.com/2008/06/04/primary-keys-and-non-unique-indexes-whats-really-happening/ (and other items).

  • Drop a primary key

    If it does not create an orphan can not drop us a primary key?

    My book says no.  Steve O'Hearn page text 1z0-047 432.

    For example, consider this code:

    CREATE TABLE CRUISE_ORDERS

    (NUMBER OF CRUISE_ORDER_ID,

    ORDER_DATE DATE,

    PK_CO (CRUISE_ORDER_ID, ORDER_DATE) PRIMARY KEY CONSTRAINT);

    CREATE TABLE ORDER_RETURNS

    (NUMBER OF ORDER_RETURN_ID,

    NUMBER OF CRUISE_ORDER_ID

    DATE OF CRUISE_ORDER_DATE,

    CONSTRAINT PK_OR PRIMARY KEY (ORDER_RETURN_ID).

    FOREIGN KEY CONSTRAINT FK_OR_CO

    (CRUISE_ORDER_ID, CRUISE_ORDER_DATE)

    REFERENCES CRUISE_ORDERS (CRUISE_ORDER_ID, ORDER_DATE));

    These SQL statements will create two tables with a FOREIGN KEY relationship

    linking them together - see Figure 11 - 1 for the model of data representing the

    relationship.

    In the CRUISE_ORDERS table that we just created, we cannot let down the CRUISE_

    ORDER_ID column or the ORDER_DATE column, for two different reasons:

    They are part of the PRIMARY KEY constraint and forced to columns

    cannot be deleted unless the constraint first fell;

    They are part of the key referred to in the FOREIGN KEY of another table.

    They cannot be deleted as long as a FOREIGN KEY constraint refers to them.

    Similarly, we cannot remove the column the table ORDER_RETURNS that

    is subject to the constraint PRIMARY KEY (ORDER_RETURN_ID), or the...

    Easily, you should be able to remove the column order_return_id. I did it myself. Only, I caught this post back to the chapter for a review and it made no sense to me. Perhaps because it refers to PL/SQL or an older version? (the book is 5 years old).

    In any case I do not see why a primary key without dependent columns could not be deleted.

    Like I said I tested it, and it can be moved.

    This isn't what the text says. It is said that if PK in question is mentioned by a FK, you can not remove the PK. If you take the part of the sentence on its own "BOLD", it is obviously fake.

  • How to create validation of business for a composite primary key

    Hi all

    I am newbie in oracle ADF and my knowledge is lacking in the validation of the company,

    My requirement is to display an error message when the user enter the same data into the table.

    Let me exaggerate I have a table which the composite primary key is defined on 2 columns, if the user does not have the composite primary key constraints, so I have to display the warning message.

    FYI, I use the version of Jdeveloper 11.1.2.3.0

    Please let me know the steps to create business for this rule.

    Thank you very much!!

    User, if you use adfbc, you have nothing to do because this behavior out of the box. When you create a model of your tables infrastructure creates the business rule for you.

    Timo

Maybe you are looking for