尊龙凯时人生就是博

sqlÖÐcallÊÇʲôÒâ˼

sql ÖÐµÄ call Óï¾äÓÃÓÚŲÓô洢Àú³Ì»òº¯Êý¡£´æ´¢Àú³ÌÊÇÒ»×éÔ¤±àÒëµÄ sql Óï¾ä£¬Í¨³£ÓÃÓÚÖ´ÐÐÖØ´óµÄÊý¾Ý¿â²Ù×÷¡£call Óï¾äµÄÓ﷨Ϊ£ºcall ([²ÎÊýÁбí])¡£²ÎÊýÁбí¿ÉÒÔ°üÀ¨ÊäÈë²ÎÊý£¨in£©¡¢Êä³ö²ÎÊý£¨out£©»òÊäÈë/Êä³ö²ÎÊý£¨inout£©¡£

SQL ÖÐµÄ CALL Óï¾ä

CALL Óï¾äÊÇʲô£¿

CALL Óï¾äÓÃÓÚÔÚ SQL ÖÐŲÓô洢Àú³Ì»òº¯Êý¡£´æ´¢Àú³ÌÊÇÒ»×éÔ¤±àÒëµÄ SQL Óï¾ä£¬Í¨³£ÓÃÓÚÖ´ÐÐÖØ´óµÄÊý¾Ý¿â²Ù×÷¡£

CALL Óï¾äµÄÓï·¨

CALL ([²ÎÊýÁбí]);

µÇ¼ºó¸´ÖÆ

²ÎÊýÁбí

´æ´¢Àú³Ì»òº¯Êý¿ÉÒÔ½ÓÊܲÎÊý¡£ÕâЩ²ÎÊýÔÚ CALL Óï¾äÖÐ×÷Ϊ¶ººÅÍÑÀëµÄÁбíÌṩ¡£²ÎÊý¿ÉÒÔÊÇ£º

ÊäÈë²ÎÊý£¨IN£©£º×ª´ï¸ø´æ´¢Àú³Ì»òº¯ÊýµÄÊý¾Ý¡£

Êä³ö²ÎÊý£¨OUT£©£ºÔÚÖ´Ðд洢Àú³Ì»òº¯Êýºó·µ»ØÊý¾Ý¡£

ÊäÈë/Êä³ö²ÎÊý£¨INOUT£©£º¼Èת´ïÊý¾Ý¸ø´æ´¢Àú³Ì»òº¯Êý£¬ÓÖ·µ»ØÊý¾Ý¡£

ʾÀý

ŲÓô洢Àú³Ì£º

CALL GetEmployeeInfo(12345);

µÇ¼ºó¸´ÖÆ

Õâ¸ö CALL Óï¾äŲÓô洢Àú³Ì GetEmployeeInfo£¬²¢ÏòÆäת´ïÔ±¹¤ ID 12345 ×÷ΪÊäÈë²ÎÊý¡£

ŲÓú¯Êý£º

SELECT CalculateTotal(@total);

µÇ¼ºó¸´ÖÆ

Õâ¸ö CALL Óï¾äŲÓú¯Êý CalculateTotal¡£@total ÊÇÒ»¸öÊä³ö²ÎÊý£¬ÔÚÖ´Ðк¯Êýºó½«°üÀ¨ÅÌËã³öµÄ×ܺÍ¡£

ÒÔÉϾÍÊÇsqlÖÐcallÊÇʲôÒâ˼µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ