Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[tree_tst-catalog_deleteItem]
- @id nvarchar(128),
- @username nvarchar(32)
- AS
- BEGIN
- declare @count int
- select @count = count(*) from tst_categories where parentID = @id
- if(isnull(@count,0)>0) begin
- select 0 Result, 'Необходимо очистить подкатегории ('+cast(@count as nvarchar)+' шт.)' Msg
- return
- end
- delete from tst_categories where id = @id
- Select 1 Result, '' Msg
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement