By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,587 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,587 IT Pros & Developers. It's quick & easy.

Create UNIQUE KEY

P: 12
hello
can anyone tell me how to create a table with 3 columns as UNIQUE KEY

PraDz
Sep 15 '06 #1
Share this Question
Share on Google+
1 Reply


P: 60
hi

Try this

CREATE TABLE test1
(
id int4 NOT NULL,
field1 int4,
field2 int4,
field3 int4,
CONSTRAINT idpkey PRIMARY KEY (id),
CONSTRAINT field1unique1 UNIQUE (field1),
CONSTRAINT fieldunique2 UNIQUE (field2),
CONSTRAINT fieldunique3 UNIQUE (field3)
)


-somaskarthic



hello
can anyone tell me how to create a table with 3 columns as UNIQUE KEY

PraDz
Sep 19 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.