SQL Server中的RAISERROR
等效的MySQL是什么?
CREATE procedure GetallFiles()
as
begin
if not exists(select files.Files,Users.FirstName,Users.LastName,Users.EmailAddress from files,Users
where files.UserID = Users.UserID)
raiserror('cannot find files records',16,1)
end
begin
select files.Files,Users.firstname,Users.lastname,Users.EmailAddress from files,Users
where files.UserID = Users.UserID
end
return
答案 0 :(得分:0)
SET @s = 'Unknown condition type !';
SIGNAL SQLSTATE '45001' SET MESSAGE_TEXT = @s;