MySQL Forums
Forum List  »  Newbie

What does it mean?
Posted by: Kostas Tsirigos
Date: June 25, 2005 12:55AM

Hello to everyone!
I am just beggining using MySQL in order to create a database.
I want to create this table:

id(PRIMARY KEY) name(text,unique) link(text,unique)


I use this syntax :

create table test
(id int primary key auto_increment,
name varchar(100) not null unique,
link varchar(1000) not null unique);

In this syntax, I get the message: ERROR 1170(42000): BLOB/TEXT column 'link'
used in key specification without a key length.

If I use this syntax:
create table test
(id int primary key auto_increment,
name varchar(100) not null unique,
link varchar(1000) not null);

everything is OK. Why can't I use unique twice? Or is there anything else wrong
in the first syntax???

Thank you very much

Options: ReplyQuote


Subject
Written By
Posted
What does it mean?
June 25, 2005 12:55AM
June 25, 2005 01:20AM


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.