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;
String sqlCount="select count(*) from usertable where username='"+ userName+"'";Õâ¾ä»° ʲôÒâ˼°¡£¡ Õâ¾ä»°Êä³ö³öÀ´¾ÍÊÇ select count(*) from usertable where username='ÄãµÄ±äÁ¿ ......
CREATE PROCEDURE dowhile() BEGIN DECLARE v1 INT DEFAULT 5; WHILE v1 > 0 DO SET v1 = v1 - 1; END WHILE; END ÎÒÔËÐÐmysql°ïÖúÀïÃæµÄ³ÌÐò»á±¨´í£¬²»ÖªµÀΪʲô£¬Çë ......