DECLARE sp_ApplicationId char(38);
SET sp_ApplicationId = UUID();
IF(EXISTS(SELECT sp_ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(sp_ApplicationName) = LoweredApplicationName)) THEN
SELECT 'Application Name Already Exist';
我想在满足条件时将应用程序 ID 分配给 sp_ApplicationId 我在这里使用 = 运算符,但它只比较值。我也试过 := 运算符,但它显示以下错误:
Error code 1064, SQL state 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':= ApplicationId FROM aspnet_Applications WHERE LOWER(sp_ApplicationName) = Lowe' at line 14
请帮我解决这个问题。