mysql if条件判断语句,帮忙看一下哪里语法错了?
if(1=1)thenInsertintoperson_role(PERSON_ID,VACCOUNT_ID,ROLE_ID,GMT_CREATE,GMT_MODIFIE...
if (1=1) then
Insert into person_role (PERSON_ID,VACCOUNT_ID,ROLE_ID,GMT_CREATE,GMT_MODIFIED,status,acl)
values ('21525125','1251235','3',NOW(),NOW(),'ENABLE','1');
end if;
-------------------------------------------------------------------------------
Error Code: 1064
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 'if (1=1) then
Insert into person_role (PERSON_ID,VACCOUNT_ID,ROLE_ID,GMT_CREATE' at line 1
错误提示: 展开
Insert into person_role (PERSON_ID,VACCOUNT_ID,ROLE_ID,GMT_CREATE,GMT_MODIFIED,status,acl)
values ('21525125','1251235','3',NOW(),NOW(),'ENABLE','1');
end if;
-------------------------------------------------------------------------------
Error Code: 1064
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 'if (1=1) then
Insert into person_role (PERSON_ID,VACCOUNT_ID,ROLE_ID,GMT_CREATE' at line 1
错误提示: 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询