sql - Copy PostgreSQL data to the same table, replacing some fields -
sql - Copy PostgreSQL data to the same table, replacing some fields -
i have table 3 columns:
id, name:string, location:int
i need re-create records location = 14
same table, need copies alter locations 15
. of course, id's must changed too, autoincrement values.
how do in postgresql?
insert t (name, location) select name, 15 t location = 14
sql postgresql
Comments
Post a Comment