mySQL stored procedure error -
i trying use if statement in stored mysql procedure, when try create in mysql workbench error error 1064: have error in sql syntax; check manual corresponds mysql server version right syntax use near 'database'.'table' date=datein;
.
here code:
delimiter $$ create definer=`rates_d_db` procedure `bydate`(in datein varchar(255),in action varchar(255)) begin if action = "edit" edit `database`.`table` date=datein; else select * `database`.`table` date=datein; end if; end$$
i new stored procedures, it's noob mistake.
thanx in advance!
date
reserved word in mysql. have wrap in backticks well.
Comments
Post a Comment