Jump to content

erro na criação de index


maomelov
 Share

Recommended Posts

Boa noite

Tenho a seguinte tabela Utilizador e o index criado abaixo...

create table tb_utilizador

(

id_utilizador int primary key identity (1,1),

nome nvarchar(1000) not null,

morada nvarchar(1000) not null,

cod_postal nchar(8) not null,

localidade nvarchar(1000) not null,

telefone nvarchar(16) not null,

email nvarchar(1000),

bi_cidadao nvarchar(12) not null unique

)

go

create unique index idx_nome_utilizador on tb_utilizador(nome)

--pode ser unique ou clustered???

Estou a tentar criar o indice na tabela utilizaodor,campo nome, mas surge o seguinte erro:

Warning! The maximum key length is 900 bytes. The index 'idx_nome_utilizador' has maximum length of 2000 bytes. For some combination of large values, he insert/update operation will fail.

podem ajudar?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.