Advertisement
arxeiss

Procedury DAIS

May 14th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.23 KB | None | 0 0
  1. CREATE PROCEDURE RemoveGroup
  2. --ALTER PROCEDURE RemoveGroup
  3. (@id INTEGER)
  4. AS
  5. BEGIN
  6.     BEGIN TRANSACTION deletingGroup
  7.         UPDATE users SET group_id = NULL WHERE group_id = @id
  8.         DELETE FROM groups WHERE id = @id
  9.     COMMIT
  10. END
  11. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement