我想在我的查询中打印一条消息(“数据库中不存在该表雇员”)。
我的查询是:
create proc sp_emprecord
as
begin
select * from employe
end
begin try
execute sp_emprecord
end try
begin catch
select
error_message() as errormessage,
error_number() as erronumber,
error_state() as errorstate,
error_procedure() as errorprocedure,
error_line() as errorline;
end catch