¸ÅÄîÀà似ÓÚº¯Êý,¾ÍÊÇ°ÑÒ»¶Î´úÂë·â×°ÆðÀ´,µ±ÒªÖ´ÐÐÕâÒ»¶Î´úÂëµÄʱºò,¿ÉÒÔͨ¹ýµ÷Óøô洢¹ý³ÌÀ´ÊµÏÖ.ÔÚ·â×°µÄÓï¾äÌåÀïÃæ,¿ÉÒÔÓÃif/else, case,whileµÈ¿ØÖƽṹ.¿ÉÒÔ½øÐÐsql±à³Ì.
ÔÚmysqlÖÐ,´æ´¢¹ý³ÌºÍº¯ÊýµÄÇø±ð,
Ò»¸öÊÇÃû³Æ²»Í¬,
¶þ¸ö¾ÍÊÇ´æ´¢¹ý³ÌûÓзµ»Ø值.
Èç¹ûÏë»ñµÃ·µ»Ø值Ôõô°ìÄÇ£¿Í¨¹ýoutÐÔ±äÁ¿¾ÍOK£¡
²é¿´ÏÖÓеĴ洢¹ý³Ì:
Show procedure status
ɾ³ý´æ´¢¹ý³Ì
Drop procedure ´æ´¢¹ý³ÌµÄÃû×Ö
µ÷Óô洢¹ý³Ì
Call ´æ´¢¹ý³ÌÃû×Ö();
1 ¹ý³ÌÀïÃæÉùÃ÷±äÁ¿
2 ±äÁ¿²ÎÓëÔËËãºÍ¼òµ¥¿ØÖÆÓï¾ä
3 ¸ø´æ´¢¹ý³Ì´«µÝ²ÎÊý
4 whileÑ»·
5 Êä³öÐͱäÁ¿<†·Ÿ"http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PGltZyBzcmM9"http://www.2cto.com/uploadfile/Collfiles/20141110/2014111009145959.png" alt="\">
6 switchÓï¾ä
7 do whileÓï¾ä