sql returning - ghdrako/doc_snipets GitHub Wiki

insert into j_posts_tags (tag_pk,post_pk) values(1,3) returning *;
tag_pk | post_pk
--------+---------
1 | 3
delete from t_categories where pk=4 returning
pk,title,description;
pk | title | description
----+------------------+------------------------------
4 | Machine Learning | Machine Learning discussions
update categories set title='A.I' where pk=4 returning
pk,title,description;
pk | title | description
----+-------+------------------------------
4 | A.I | Machine Learning discussions