Bom dia,

quando criei uma tabela nao fiz como chave composta os campos chaves, agora 
quero altera-la para chave primary key e nao estou conseguindo ou nao estou
entendo como faze-lo.
imobiliaria=# \d cadalu
              Table "public.cadalu"
   Column   |          Type          | Modifiers 
------------+------------------------+-----------
 fil_ch     | numeric(3,0)           | not null
 cli_ch     | numeric(5,0)           | not null
 tit_ch     | numeric(6,0)           | not null
 tip_ch     | character(2)           | not null
 seq_ch     | character(4)           | not null
 dt_emissao | date                   | 
 dt_vencto  | date                   | 
 cliente    | numeric(5,0)           | 
 hora       | time without time zone | 
 val_comi   | numeric(8,2)           | 
 pg_comi    | numeric(1,0)           | 

estou fazendo assim:
imobiliaria=# alter table cadalu add constaint chv_numero_cadalu primary  key 
(fil_ch,cli_ch,tit_ch,tip_ch,seq_ch);
ERROR:  syntax error at or near "(" at character 65


mas recebo este erro.

Alguem poderia me ajudar?



-- 

Carlucio Lopes- Cobolito 62-8415-8939 msn:[EMAIL PROTECTED]
Entenda Pirataria => http://www.carlinux.v10.com.br 
Compilador Cobol Free http://tinycobol.org em Portugues
Porque Cobol? ==> http://www.clubecobol.com.br/cc_porque_cobol_02.asp
Projeto Debian Brasil http://cdd.debian-br.org Tinycobol/Debian 
Gnu-Linux/Postgresql/Tcl-Tk
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a