mysql Óï¾ä´íÎó - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql
CREATE PROCEDURE dowhile()
BEGIN
DECLARE v1 INT DEFAULT 5;
WHILE v1 > 0 DO
SET v1 = v1 - 1;
END WHILE;
END
ÎÒÔËÐÐmysql°ïÖúÀïÃæµÄ³ÌÐò»á±¨´í£¬²»ÖªµÀΪʲô£¬ÇëÖªµÀµÄ¸æËßÎÒÒ»ÏÂ
´íÎó´úÂë: 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 'INT DEFAULT 5' at line 3
(ºÄ·Ñ 0 ms)
´íÎó´úÂë: 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 'WHILE v1 > 0 DO
SET v1 = v1 - 1' at line 1
(ºÄ·Ñ 0 ms)
´íÎó´úÂë: 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 'END WHILE' at line 1
(ºÄ·Ñ 0 ms)
´íÎó´úÂë: 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 'END' at line 1
(ºÄ·Ñ 0 ms)
ѧϰ¡£¡£¡£
ÎÒÔËÐÐȷʵ±¨´í£¬ÎÒÔÚsqlyogÀïÃæÔËÐеģ¬mysql°æ±¾ÊÇ5.0.22µÄ
ÆäʵÎÒÏëÑ»·µÄд²åÈëÓï¾ä£¬ÖªµÀÔõôдµÄ´ó¸ç£¬Âé·³¸æËßÎÒ°¡
ÎÒÖ´ÐÐ
mysql> delimiter ;
mysql>
mysql> call dowhile;
ûÓз´Ó¦
SQL code:
mysql&
Ïà¹ØÎÊ´ð£º
Óиöwinform³ÌÐò,ʹÓÃc#+mysql,ÐèÒªÔÚÒ»¸ö´°ÌåÉèÖÃmysql×Ô¶¯É¾³ý¹¦ÄÜ,°üÀ¨×Ô¶¯É¾³ý¶àÉÙÌì֮ǰµÄÊý¾ÝÒÔ¼°ÊÇ·ñ¿ªÆô×Ô¶¯É¾³ý¹¦ÄÜ,ÎÒ³ÌÐòÍ˳öºó,»¹Ôõô¿ØÖÆMysql×Ô¼ºÉ¾³ý°¡?ÊDz»ÊÇÒªÓÃmysqlµÄeventÀ´ÊµÏÖ?c#¿ÉÒÔµ÷ÓÃmysq ......
String sqlCount="select count(*) from usertable where username='"+
userName+"'";Õâ¾ä»° ʲôÒâ˼°¡£¡
Õâ¾ä»°Êä³ö³öÀ´¾ÍÊÇ
select count(*) from usertable where username='ÄãµÄ±äÁ¿ ......
MysqlÖÐÊÇ·ñÓÐÕâÑùµÄȨÏÞÉèÖÃ
ÓÐÒ»¸öÁд洢µÄÊÇÊÖ»úºÅ£¬Ä³Ò»Óû§µÄȨÏÞÔÚ¶ÁÈ¡µÄʱºòÖ»ÏÔʾǰ¼¸Î»£¬ºó¼¸Î»ÓÃÆäËû×Ö·ûÀýÈç*´úÌæ¡£ÀýÈç123456¶Á³öÀ´ÊÇ123***
£¿
¿ÉÒÔ×ö¸öÊÓͼ£¬È»ºó²»¸øÕâ¸öÕ˺űíµÄȨÏÞ£¬½ö¸øÕâ¸öVI ......
ÎÒÏÖÔÚÏëÓÃJSPʵÏÖQQÓÊÏäÀïµÄ¶¨Ê±·¢ËÍ£¬ÎÒÏëͨ¹ýÊý¾Ý¿â½øÐж¨Ê±²åÈëÊý¾Ý¡£
µ«²»ÖªµÀÈçºÎʵÏÖ£¬»òÕß´ó¼ÒÓиüºÃµÄ·½·¨£¬²»Ò»¶¨ËµÊÇÊý¾Ý¿â¡£
Çë´ó¼Ò¸øµãÒâ¼û£¬°ÝлÀ²¡£
quataz¶¨Ê±Æ÷×é¼þÊǸöºÜºÃµÄ½â¾ö·½°¸¡£
È ......