0
我有一个case语句是这样的:无法理解一个case语句
CASE
WHEN purpose = "" THEN SET @sPurpose = "%%"
WHEN purpose IS NULL THEN SET @sPurpose = "%%"
ELSE SET @sPurpose = concat("%",purpose,"%");
END;
,但是当我尝试编译的程序,它抛出这个错误:
SQL Error: 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
'WHEN purpose IS NULL THEN SET @sPurpose = "%%" ELSE SET @sPurpose = co' at line 13
我只是缺少一些语法的东西?
这确实结束了工作。非常感谢! – smarble 2013-04-22 23:50:48
@smarble不用客气':D' – 2013-04-22 23:53:00