create procedure proc_batchUpdate(in categoryId integer , in artIds varchar(50)) begin set @dsql = count('update article set type=' , categoryId , ' where id in (' , artIds , ')') ; prepare s1 from @dsql; execute s1; end;
CREATE PROCEDURE dowhile() BEGIN DECLARE v1 INT DEFAULT 5; WHILE v1 > 0 DO SET v1 = v1 - 1; END WHILE; END ÎÒÔËÐÐmysql°ïÖúÀïÃæµÄ³ÌÐò»á±¨´í£¬²»ÖªµÀΪʲô£¬Çë ......
ÎÒÐèҪʹÓÃnhibernateµ÷ÓÃmysqlº¯Êý£¬ÀàËÆµÄsqlÓï¾ä£º select * from concat(',', ServiceCodes, ',') like '%,33,%'; »òselect * from (','||ServiceCodes||',') like '%,33,%'; ËùÒÔÎÒ¾ÍÕâÑùµ÷Ó㺠//..... ......