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

Similar Messages

  • Difference between Primary Key and Unique+Not NUll

    Hi Guys,
    Is there any difference the column being declared as primary key or unique+NOT NULL.
    Please let me know the internal and application point of view.
    Thanks in advance!
    Ranjan

    957590 wrote:
    Ok,Thanks however I donot think Primary key uses unique indexPK uses whatever index you specify - unique or not (as long as index is on proper column(s)). However, if you do not specify any index, PK creates unique index:
    SQL> create table tbl(
      2                   id number,
      3                   name varchar2(10)
      4                  )
      5  /
    Table created.
    SQL> alter table tbl
      2    add constraint tbl_pk
      3      primary key(
      4                  id
      5                 )
      6  /
    Table altered.
    SQL> select  index_name,
      2          uniqueness
      3    from  user_indexes
      4    where table_name = 'TBL'
      5  /
    INDEX_NAME                     UNIQUENES
    TBL_PK                         UNIQUE
    SQL> select  constraint_name,
      2          index_name
      3    from  user_constraints
      4    where table_name = 'TBL'
      5  /
    CONSTRAINT_NAME                INDEX_NAME
    TBL_PK                         TBL_PK
    SQL>  alter table tbl
      2    drop primary key
      3  /
    Table altered.
    SQL> create index tbl_non_unique_pk_index
      2    on tbl(
      3           id
      4          )
      5  /
    Index created.
    SQL> alter table tbl
      2    add constraint tbl_pk
      3      primary key(
      4                  id
      5                 )
      6        using index tbl_non_unique_pk_index
      7  /
    Table altered.
    SQL> select  index_name,
      2          uniqueness
      3    from  user_indexes
      4    where table_name = 'TBL'
      5  /
    INDEX_NAME                     UNIQUENES
    TBL_NON_UNIQUE_PK_INDEX        NONUNIQUE
    SQL> select  constraint_name,
      2          index_name
      3    from  user_constraints
      4    where table_name = 'TBL'
      5  /
    CONSTRAINT_NAME                INDEX_NAME
    TBL_PK                         TBL_NON_UNIQUE_PK_INDEX
    SQL> insert
      2    into tbl
      3    values(
      4           1,
      5           'A'
      6          )
      7  /
    1 row created.
    SQL> insert
      2    into tbl
      3    values(
      4           2,
      5           'B'
      6          )
      7  /
    1 row created.
    SQL> insert
      2    into tbl
      3    values(
      4           1,
      5           'C'
      6          )
      7  /
    insert
    ERROR at line 1:
    ORA-00001: unique constraint (SCOTT.TBL_PK) violated
    SQL> SY.

  • Update a primary key and Fk

    Hello
    I have to update a primary key (PK) which is referenced by many foreign keys (FK).
    The primary key columns cannot be updated as this would orphan the dependant tables,
    and the dependant tables cannot be updated prior to the parent table as this would also make them orphans.
    I think this problem was solved by disabling the foreign key constraints or deleting the original records and recreating them.
    Since neither of these solutions is particularly satisfactory for me I read about 'deferred constraints'.
    My question is:
    Can I use(modify to) 'INITIALLY DEFERRED' keyword on constraints's table already created with The default, INITIALLY IMMEDIATE ,
    that is, update my primary key and foreign keys, and then re-set to
    'INITIALLY IMMEDIATE'? Or another trick exists ?
    Thanks in advance for your attention

    It is very popular the idea that the updates on primary key columns are a very bad thing.
    Oracle supports this idea and that's why they don't give the "on update cascade" clause on foreign keys.
    So in this case I suggest you to define a master table like this.
    create table master_table (
         key_id number primary key,
         your_primary_key varchar2 not null unique
    /Then you must use that key_id column as foreign key in place of your original primary key. In this way don't even need to update referencing rows when updating the original primary key because the foreign key value doesn't change and everything is always fine as before.
    So instead to lose time implementing some strange sort of cascade triggers plain to do something like this on your schema.
    insert into master_table (id_key,primary_key) (
         select rownum,primary_key
         from your_main_table
    alter table your_main_table add (
         id_key number,
    update your_main_table a
    set id_key = (
              select b.id_key
              from master_table
              where b.primary_key=a.primary_key
         Drops foreign keys
    alter table your_main_table drop primary key cascade
    alter table your_main_table add constraint pk
         primary key(id_key)
    alter table your_main_table add constraint fk
         foreign key(id_key) references master_table
    alter table your_main_table drop (
         your_primary_key
    alter table a_referencing_table add (
         id_key number,
    update a_referencing_table a
    set id_key = (
              select b.id_key
              from master_table
              where b.primary_key=a.primary_key
    alter table a_referencing_table add constraint fk_2
         foreign key(id_key) references master_table
    alter table a_referencing_table drop (
         your_primary_key
    /If you have many objects referencing those tables I suggest you to rename the tables and to create views with the original name of the renamed tables that show data as it was before with a join on master_table. in this way you don't need to change the code of the application referencing them but you just need to recompile invalidated objects.
    Bye Alessandro

  • Difference between PRIMARY KEY and UNIQUE KEY with NOT NULL

    What is the difference between PRIMARY KEY and UNIQUE KEY with NOT NULL constraint?
    Message was edited by:
    Nilesh Hole

    Answer for the master!!!
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:8743855576462
    Thanks,
    Karthick

  • Is their a difference between primary key and unique key with not null valu

    What is the difference in having a column as primary key and having unique key with not null for the column.
    vinodh

    SBH wrote:
    For quick review, below is the link
    http://www.dba-oracle.com/data_warehouse/clustered_index.htm
    You appear to have stumbled on a site that is a mine of disinformation about Oracle.
    >
    It would be helpful, if you explain it too..thnx !!
    The site is wrong and makes up its own terminology as it goes along.
    If the value for clustering factor approaches the number of blocks in the base table, then the index is said to be clustered. http://www.oracle.com/pls/db112/search?remark=quick_search&word=clustered+index
    There is no create clustered index in Oracle.
    - Clustering factor affects the efficiency of an index.
    - There can be clustered tables that you can create indexes on.
    - An Index Organized table is a similar concept to the Microsoft SQL Server clustered index, but it isn't the same thing at all.

  • Primary Key and Foreign Key Constraints

    Hi All,
    I would like to know PRIMARY KEY and FOREIGN KEY constraints on existing oracle tables. Could any one suggest me how to find out.
    Thanks,
    RED

    You can query DBA_CONSTRAINTS to get a list of all the constraints on table A and/or table B. The documentation I linked to gives a full list of the data you can see in DBA_CONSTRAINTS, but it includes things like the referenced table name and referenced constraint name for a foreign key constraint. If A is a parent of B or B is a parent of A, you could match up the parent's primary key constraint to the child's foreign key constraint.
    More generally, though, if you don't know that one of the tables is a parent of the other, figuring out how to join the two tables is probably not something that can be done using just the Oracle data dictionary. You would probably need an understanding of the data model being used to figure out what intermediate table(s) needed to be joined in order to relate rows in A to rows in B.
    Justin

  • Primary keys and constraints are gone....

    Hi Experts,
    I had a schema SchemaD with all primary keys and referential constraints. And i am a TOAD user. I had one more source schema SchemaS.
    In my destination schema all the tables has 2 extra columns for data warehouse purpose.
    I disabled all the constraints and i used toad utility "Copy Data to Another Schema" and i selected all the tables from Source SchemaS.
    After the completion of data copy i tried to enable all the constraints in SchemaD. But i found that there are no primary keys and referential integrates in that schema.
    Please help me in this issue.
    Thanks...
    Ray

    Check in the views "DBA_CONSTRAINTS" or ALL_CONSTRAINTS" with the condition owner='your_schema_name'
    If you are using toad to view the constraints, chances are high that there is a filter in the toad view and it is filtering the constraints...
    Edited by: Suchit on Feb 25, 2009 5:19 PM
    Edited by: Suchit on Feb 25, 2009 5:20 PM

  • How to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.

    how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.  thanks

    INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
       SELECT col1, col2, col3, ...
       FROM   sourcedb.dbo.tbl
    Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Access path difference between Primary Key and Unique Index

    Hi All,
    Is there any specific way the oracle optimizer treats Primary key and Unique index differently?
    Oracle Version
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> Sample test data for Normal Index
    SQL> create table t_test_tab(col1 number, col2 number, col3 varchar2(12));
    Table created.
    SQL> create sequence seq_t_test_tab start with 1 increment by 1 ;
    Sequence created.
    SQL>  insert into t_test_tab select seq_t_test_tab.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats(USER_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
            259  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> create index idx_t_test_tab on t_test_tab(col1);
    Index created.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> Sample test data when using Primary Key
    SQL> create table t_test_tab1(col1 number, col2 number, col3 varchar2(12));
    Table created.
    SQL> create sequence seq_t_test_tab1 start with 1 increment by 1 ;
    Sequence created.
    SQL> insert into t_test_tab1 select seq_t_test_tab1.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB1',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab1;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1727568366
    | Id  | Operation         | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |             | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB1 | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> alter table t_test_tab1 add constraint pk_t_test_tab1 primary key (col1);
    Table altered.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB1',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab1;
    99999 rows selected.
    Execution Plan
    Plan hash value: 2995826579
    | Id  | Operation            | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                | 99999 |   488K|    59   (2)| 00:00:01 |
    |   1 |  INDEX FAST FULL SCAN| PK_T_TEST_TAB1 | 99999 |   488K|    59   (2)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6867  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> If you see here the even though statistics were gathered,
         * In the 1st table T_TEST_TAB, the table is still using FULL table access after creation of index.
         * And in the 2nd table T_TEST_TAB1, table is using PRIMARY KEY as expected.
    Any comments ??
    Regards,
    BPat

    Thanks.
    Yes, ignored the NOT NULL part.Did a test and now it is working as expected
    SQL>  create table t_test_tab(col1 number not null, col2 number, col3 varchar2(12));
    Table created.
    SQL>
    create sequence seq_t_test_tab start with 1 increment by 1 ;SQL>
    Sequence created.
    SQL> insert into t_test_tab select seq_t_test_tab.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL>  exec dbms_stats.gather_table_stats('GREP_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL>  set autotrace traceonly
    SQL>  select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6912  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL>  create index idx_t_test_tab on t_test_tab(col1);
    Index created.
    SQL>  exec dbms_stats.gather_table_stats('GREP_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL>  select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 4115006285
    | Id  | Operation            | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                | 99999 |   488K|    63   (2)| 00:00:01 |
    |   1 |  INDEX FAST FULL SCAN| IDX_T_TEST_TAB | 99999 |   488K|    63   (2)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6881  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL>

  • Assigning primary key and index for a table

    I have a database consisting of only one table with 10 million rows which mostly looks like this:
    RECORDDATE                     ID     CLASS     VALUE
    24-JAN-12 10.52.47.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     10     156
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     10     156
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     6     38
    24-JAN-12 10.53.05.000000 AM     253     16     197
    24-JAN-12 10.53.06.000000 AM     98     10     150
    24-JAN-12 10.53.06.000000 AM     98     0     0
    24-JAN-12 10.53.06.000000 AM     98     4     0
    24-JAN-12 10.53.06.000000 AM     98     11     33As you can see there are several entries that look exactly the same. Currently, I don't have primary key or index for any column and have a lot of performance issues. For example this query takes more than 10 seconds to run:
    select distinct      ID
    from      scdatabase4
    where ID < 253
    order by 1Since database is not my primary job and have no background of it, I'm really confused about what to do to fix my issues. Could someone please help me in assigning primary key and index if you agree that this is the problem?!

    Execute the query below to help decide what column to index:
    SELECT COLUMN_NAME, NUM_DISTINCT, NUM_NULLS, NUM_BUCKETS, DENSITY
    FROM DBA_TAB_COL_STATISTICS
    WHERE TABLE_NAME = 'your_table_name'
    ORDER BY COLUMN_NAME;
    The important columns are:
    1) NUM_DISTINCTS: Indicates the number of distinct values. If this number is very low for a column, it indicates that this column is not a very good candidate for a B-Tree index.
    2) NUM_NULL: Indicates the number of null values for each column. A column with few null values is a good candidate for a index
    But be aware, this is not a rule, it's just a method to help decide which column will have the most benefit of index creation.

  • Primary key 1700 does not exist...

    Hello,
    I have a strange behaviour with my Entity bean. I am trying to make an update of an entity bean through a session bean, and it works only for primary keys inferior to a precise number (maybe 1700).
    Otherwise the update throws the following error :
    javax.ejb.NoSuchEntityException: [EJB:010142]Instance of EJB 'VEtHr' with primary key '1999' does not exist.
    Do you have any idea about the problem ?
    Thanks... :-)
    Do I need to change the <max-beans-in-cache> variable? (I have already tried with a very big number).
    Regards,

    The problem is strange because before trying the update method of EJB, I am trying to get the full line by the id (getByPrimaryKey). And it works. I get all data for primary key =5002 for example.
    But when I try to update it, I get this message :
    ; nested exception is:
         javax.ejb.NoSuchEntityException: [EJB:010142]Instance of EJB 'VEtHr' with primary key '5002' does not exist.
    My update method is just like this :
    public void updateVEtHr(VEtHrDto vEtHrDto) throws RemoteException {
    if (vEtHrDto != null) {
    Integer hrId = vEtHrDto.getHrId();
    try {
    VEtHr vEtHr = vEtHrHome.findByPrimaryKey(hrId);
    setVEtHrFromVEtHrDto(vEtHr, vEtHrDto);
    catch (FinderException e) {
    throw new RemoteException(e.getMessage());
    }

  • Difference between primary key and primary index

    Dear All,
             Hi... .Could you pls tell me the difference between primary key and primary index.
    Thanks...

    Hi,
    Primary Key : It is one which makes an entry of the field unique.No two distinct rows in a table can have the same value (or combination of values) in those columns.
    Eg: first entry is 111, if you again enter value 111 , it doesnot allow 111 again. similarly for the strings or characters or numc etc. Remember that for char or numc or string 'NAME' is not equal to 'name'.
    Primary Index: this is related to the performance .A database index is a data structure that improves the speed of operations in a table. Indices can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records. The disk space required to store the index is typically less than the storage of the table (since indices usually contain only the key-fields according to which the table is to be arranged, and excludes all the other details in the table), yielding the possibility to store indices into memory from tables that would not fit into it. In a relational database an index is a copy of part of a table. Some databases extend the power of indexing by allowing indices to be created on functions or expressions. For example, an index could be created on upper(last_name), which would only store the uppercase versions of the last_name field in the index.
    In a database , we may have a large number of records. At the time of retrieving data from the database based on a condition , it is a burden to the db server. so whenever we create a primary key , a primary index is automatically created by the system.
    If you want to maintain indices on other fields which are frequently used in where condition then you can create secondary indices.
    Reward points if helpful.
    Thanks,
    Sirisha..

  • Primary keys and store generated pattern

    Hi,
    in my database first application (Firebird), the primary keys are not set to identity by default !
    any ideas why this ?

    Solved !
    put #PK_GEN# as comment for your primary key and now EF import primary keys columns as identity like expeted :)
    btw, fb 3.0 and up support identity columns .

  • GeoMedia - Primary key types are not matching

    I'm working on converting Access Spatial layers into Oracle Spatial layers using the Locator in Oracle 9i.
    I have the Access PK as Long Interger
    and the Oracle PK as Number (10,0).
    I can't get around this error : Primary key types are not matching

    Hi,
    please refer to
    http://www.oracle.com/technology/pub/notes/technote_access_migration.html
    You may try the OWM (Oracle Migration Workbench), if your data are more complex than one or two tables.
    regards, Andreas
    long integer(access) Number(11,0)(default) Number(11,0) (recommended)
    -----

  • Primary key and WHO columns on EO

    We are trying to create a EO based on a database view. We do not have primary key and standard OA WHO columns but the OA framework is forcing us the have these columns. How do we go about this issue? Any suggestion will be appreciated.

    Oracle Apps mandates that you should have the Audit columns in the Applications tables.
    So you must have the 5 columns defined.
    I have created new tables for my application and need to populate them whenever user creates or modifies any row
    Jdeveloper/BC4J handles direct updates/inserts through default EO implementation, it would insert/update/delete from the base table via the EO, what is your qeustion then ? do you want to know how to perform DMLs in OA or something else ?
    Thanks
    Tapash

Maybe you are looking for

  • Preview In Browser Not Working With Safari 3.0 On Mac

    When using the "Preview in Browser" command from DW CS3, the file address information is incorrect when previewed in Safari 3.0. I don't recall this being a problem before I updated my Mac to Tiger. Anyone else had any problems with this? Thanks, clo

  • My Equal method is not working in array person!!! help me pls

    My assignment is to create an application program that declares an array of 100 components of type person. add a person into the array and (CHECK DUPLICATE ENTRIES ARE NOT ALLOWED) my code is(this is in another class): public Boolean equals(Person p1

  • Synch multiple Aperture 3 Libraries to iPhone?

    I've always kept my images in a few different libraries, and happy to see better support for this in A3. I like having my portfolio on my iPhone, but iTunes will only synch the currently loaded Aperture Library. If you try to synch with a new Library

  • Regular expression and pattern matching/replacing

    I have a list of key words. It has around 1000 key word now but can grow to 5000 keywords. My web application displays lot of texts which are stored in the database. My requirement is to scan each text for the occurance of any of the above keywords.

  • MBP 15" 2007 with internal monitor off, main monitor signal on external monitor

    My MBP 15" 2.2 2007 2 MB RAM NVIDIA GeForce 8600 internal monitor has no video after startup.  If I connect my Apple Cinema Display to it, the video of the main monitor is on it, and the internal screen stays off.  If I hit the "Detect displays" swit