Re: [SQL] CREATE TABLE with foreign key and primary key

2000-07-10 Thread Oliver Elphick
"Paulo Roberto Siqueira" wrote: >ufgvirtual=# create table matricula ( >ufgvirtual(# id_aluno char(15) references pessoa, >ufgvirtual(# id_curso int4 references curso_polo, >ufgvirtual(# id_polo int2 references curso_polo, >ufgvirtual(# local_prova varchar(50) not null, >ufgvirtual(# a

[SQL] CREATE TABLE with foreign key and primary key

2000-07-09 Thread Paulo Roberto Siqueira
I'm trying to create a table that has three fields as primary key. These fields must exist in two other tables. id_aluno is primary key in table pessoa, id_curso and id_polo are primary key in table curso_polo. But it seems it won't work. What am I doing wrong? See definitions below. Speci