USE pubs
DECLARE @num int
IF @num = 0
GOTO Err
ELSE
BEGIN
PRINT 'authors found'
--select * from authors
--GOTO Last
GOTO Err
END
Err: PRINT 'no authors found'
Last: PRINT 'Finish execution'
GO
DECLARE @num int
IF @num = 0
GOTO Err
ELSE
BEGIN
PRINT 'authors found'
--select * from authors
--GOTO Last
GOTO Err
END
Err: PRINT 'no authors found'
Last: PRINT 'Finish execution'
GO