Guest User

Untitled

a guest
Dec 9th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. DELIMITER //
  2. CREATE PROCEDURE ins_upd (in x int(10), in y varchar(20))
  3. begin
  4. if (x IN (SELECT ID FROM my_table) then
  5. UPDATE my_table SET ID=x, NAME=y;
  6. else
  7. INSERT INTO my_table values (x, y);
  8. end if;
  9. end//
Add Comment
Please, Sign In to add comment