Re: How to create a uniq index on two non uniq columns
Posted by: Peter Brawley
Date: January 29, 2008 10:41AM

drop table if exists t;
create table t(i int,j int,k int,primary key(i),unique key(j,k));
insert into t values(1,1,1),(2,1,2),(3,2,1),(4,2,2);
select * from t;
+---+------+------+
| i | j | k |
+---+------+------+
| 1 | 1 | 1 |
| 2 | 1 | 2 |
| 3 | 2 | 1 |
| 4 | 2 | 2 |
+---+------+------+

What is the problem?

PB
http://www.artfulsoftware.com

Options: ReplyQuote


Subject
Written By
Posted
Re: How to create a uniq index on two non uniq columns
January 29, 2008 10:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.