This is a discussion on Foreign Key / Auto Increment within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Is it ok to reference an auto-increment column (of parent table) as a foreign key in a child table?...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| If by auto_increment column you mean sequence generated key value then yes it would be fine to reference the PK of the parent table from the child table. In the case of an inherited key in the child table how else would you do it? HTH -- Mark D Powell -- |
| ||||
| Nouman Shah wrote: > Is it ok to reference an auto-increment column (of parent table) as a foreign key in a child table? There is no such thing as an autoincrement column in Oracle. Please provide the following: 1. Name of product and version you are using 2. Describe of the table in question But likely the answer, in any database product, is that a reference or SELECT can do no harm. -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace 'x' with 'u' to respond) |