CREATE TABLE pizza_runner.tes ( id serial4 NOT NULL, "no" int4 NULL ); --after that import data as usual --only need to import the no value only, serial key will automatically generated ----truncate and alter first to restart the primary key into 1 truncate table pizza_runner.tes ALTER SEQUENCE <tablename>_<id>_seq RESTART WITH 1 ALTER SEQUENCE pizza_runner.tes_id_seq RESTART WITH 1