Brian
Member since Jan 21, 2009
- Profile: /members/2809-brian.htm
- Comments: 3
Recent Blog Comments By Brian
-
MySQL Does Not Support IF / ELSE Statements In General SQL Work Flow
Posted on Jan 21, 2009 at 11:20 AM
Hi Ben, That is exactly what I was trying to define. I started reading from the bottom up ( my excuse is that It was late ) and was really trying to help out Mike - who, like me, should have read the intro paragraph fully. Cheers... read more »
-
MySQL Does Not Support IF / ELSE Statements In General SQL Work Flow
Posted on Jan 21, 2009 at 2:19 AM
Rats - didn't check the code - ignore above this will work: DELIMITER $$ DROP PROCEDURE IF EXISTS `update_op`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `update_op`(_i_contactid INT) BEGIN IF (_i_contactid IS NULL) THEN /* do something with NULL param*/ Select 5; ELSE /* do something else par... read more »
-
MySQL Does Not Support IF / ELSE Statements In General SQL Work Flow
Posted on Jan 21, 2009 at 2:14 AM
For my version (5.0.32-Debian_7etch3-log ) this works for me: DELIMITER $$ DROP PROCEDURE IF EXISTS `dbname`.`update_op`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `update_table`(_i_contactid INT) BEGIN IF (_i_contactid IS NULL) THEN /* do something with NULL param*/ ELSE /* do something e... read more »