Paulo J. Matos wrote:
> Hi all,> CREATE TABLE socio (> id integer SERIAL PRIMARY KEY,> nome varchar,> alcunha string,>
data_filiacaodate)>> CREATE TABLE paga_cota (> ano integer,> mes integer,> valor integer,> id integer,>
PRIMARY KEY(id,ano,mes),> FOREIGN KEY(id) REFERENCES(socio))>>> After this I get an error around CREATE (of the
2ndtable). I> just can't imagine what it might be.>
First ...
SERIAL means an integer with primary key [tableName]_pkey (socio_pkey),
not null and default set to sequence: [tableName]_[fieldName]_seq
(socio_id_seq).
Probably this is what you want!!
CREATE TABLE socio (id SERIAL,
...
Second ...
String ?? ... maybe char(x) or varchar(x) or text or ...
Third ...
FOREIGN KEY(id) REFERENCES socio ...
George Moga,george@dsn.roBraila, ROMANIA