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&
Ïà¹ØÎÊ´ð£º
ÎÒµÄmysqlÔõôûÓа취дÈëÖÐÎÄÊý¾Ý£¿Ö»ÒªÊÇÊý¾ÝдÈëÊý¾Ý¿âʱ ¾Í»á±ä³ÉÈý¸öÎʺŠ£¿Çë½Ì¸ßÈË£¡£¡
linux? ÔõôдÈëµÄ
ÔÚmysqlÖÐÖ´ÐÐ show variables like 'character%'Ìù½á¹û³öÀ´¡£
ÔÚ°²×°MYSLQʱ½«Êý¾Ý¿âµÄ×Ö· ......
ÎÒÓõÄÊÇÁ¬½Ó³Ø×öµÄ£¬ÅäÁ¬½Ó³ØµÄ·½·¨Ó¦¸ÃûÓÐ´í£¬ÎªÊ²¾ÍÊdzöÏÖÕâÖÖÎÊÌâ
javax.servlet.ServletException: javax.naming.NameNotFoundException: No object bound to name java:comp/env/test
ÇëÎÊ´óÏÀÃÇÕâÊÇÔ ......
String SQL="insert into ѧÉúÐÅÏ¢±í values(StudentNumber,StudentName,StudentAge)";ÆäÖÐStudentNumber,StudentName,StudentAge¶¼ÊDZäÁ¿¡£ÕâÑùд²»¶Ô¡¡µ½µ×¸Ãզд°¡
Íò·Ö¸Ðл£¡
String SQL=&q ......
¸Õ¸Õ½Ó´¥MySQL,²»ÖªµÀ¸ÃÈçºÎÈ¥²é¿´Êý¾Ý£¬²åÈëÊý¾Ý£¬´´½¨Êý¾Ý¿â¡¢±í£¬ÓÃÄÄΪǰ±²ÄÜÖ¸½ÌÒ»¶þ£¿
MySQL 5.1²Î¿¼ÊÖ²á
ÒýÓÃ
ÐÖµÜÄã»á½áÌùÂð£¿
mysql ²Î¿¼ÊÖ²á
baidu
MySQL¹Ù·½Îĵµ http://dev.mysql.com/doc ......
ͨ¹ýODBCÁ¬½ÓMySQLÊý¾Ý¿â£¬Á¬½Ó³É¹¦£¬µ«²»ÄܲéѯÊý¾Ý£¬²»ÖªµÀΪʲô
'Á¬½ÓmysqlÊý¾Ý¿â
str = "dsn=test;driver={MySQL odbc 3.51 Driver};server=localhost;port=3306;uid=root;pwd=;database=officesyst ......