Guest User

Untitled

a guest
Jul 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. select id into articleId from articles where title = 'my new blog';
  2. if articleId is null then
  3. insert into articles (title, content) values (_title, _content)
  4. returning id into articleId;
  5. end if;
  6. -- Continue, using articleId to represent the article for next operations...
Add Comment
Please, Sign In to add comment