-
No duplicates
Using CREATE TABLE. . . How can you specify that no duplicates are allowed on a specific field?
_
-
apply a unique constraint. Here's some example constraints ...
Code:
create table
my_table
(
col1 number primary key,
col2 number unique,
col3 references my_parent_table
);
create table
my_table
(
col1 number
constraint
xpkmy_table
using index
tablespace my_ts
pctfree 0 nologging,
col2 number
constraint
unq02my_table
using index
tablespace my_ts
pctfree 0 nologging
);
Now, go and read the SQL Reference, and the Concepts Guide, on the subject of constraints.
-
Thanks that worked. Where is the SQL Reference, and the Concepts Guide you mentioned?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|