Skip to content

Instantly share code, notes, and snippets.

@ei-grad
Last active November 23, 2016 16:30
Show Gist options
  • Save ei-grad/b41e4036a650989a64318baebfe3b258 to your computer and use it in GitHub Desktop.
Save ei-grad/b41e4036a650989a64318baebfe3b258 to your computer and use it in GitHub Desktop.
select * into temporary table tmp_camp50 from campaigns where id = 50;
update tmp_camp50 set id = nextval(campaigns_id_seq), uuid = uuid_generate_v4();
insert into campaigns (select * from tmp_camp50);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment