[QGIS-it-user] riordino id sequenziale tabella postgis

Falz falcerisimone a inwind.it
Ven 11 Ott 2019 04:52:14 PDT


Ciao!

Quando in Postgresql si crea una tabella, รจ meglio aggiungere sempre una
chiave primaria:

es:
create table nome_tabella
(id SERIAL PRIMARY KEY,
titolo VARCHAR(100) NOT NULL,
note TEXT
);
select
AddGeometryColumn('nome_schema','nome_tabella','the_geom',SRcode,tipo_geometria,tipo_coordinate_spaziali);

Nel caso di una tabella esistente:
alter table schema.nome_tabella add column pk serial primary key;

facci sapere



-----
Falz
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html


Maggiori informazioni sulla lista QGIS-it-user