[postgis-users] No Primary Key

Kevin Neufeld kneufeld at refractions.net
Tue Sep 15 08:23:52 PDT 2009


P Kishor wrote:
>> create table coal AS SELECT * from geology where group_='GONDWANA';
>>
>> But the resultant table coal is not having a 'primary key'.
>> table geology has gid as primary key.
>>
>> Pl give me a way how I can get a primary key on table coal.
>>

ALTER TABLE coal ADD PRIMARY KEY (gid);
ANALYZE coal;



More information about the postgis-users mailing list