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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -