Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin;
- create table csharp.payments_with_dupe_ids as select id, count(*) from money.payment group by 1 having count(*) > 1;
- create table csharp.backup_payments_with_dupe_ids as select * from money.payment_view where id in (select id from csharp.payments_with_dupe_ids);
- update money.payment set id = default where id in (select id from csharp.payments_with_dupe_ids );
- commit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement