Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select id into articleId from articles where title = 'my new blog';
- if articleId is null then
- insert into articles (title, content) values (_title, _content)
- returning id into articleId;
- end if;
- -- Continue, using articleId to represent the article for next operations...
Add Comment
Please, Sign In to add comment