这里我写了一个小的StoredProcedure当Id不可用它显示Else 请帮助
Alter procedure Sp_GetEmpById
(@Id int)
As
Begin
if(@Id!==ISNULL){
select Email,Gen,Country from Employee where Emp_Id =@Id
}
Else
print 'The Id Enter By u is Not Availabe '+@Id
End
这里我在ISNULL和Then Id Enter By u is Not in Availabe '+@Id
@Id
答案 0 :(得分:0)
这将编译,但我不确定您的要求:
create procedure Sp_GetEmpById @Id int
as
begin
if @Id is not NULL
select Email,Gen,Country from Employee where Emp_Id = @Id
else
print 'The Id Enter By u is Not Availabe ' + @Id
end