尊龙凯时人生就是搏

sqlÖеÄ@ÊÇʲôÒâ˼

sql ÖÐ @ ·ûºÅÓÃÓÚÖ¸¶¨Ò»¸öÅÌÎÊÖпɱäµÄ²ÎÊý £¬¶ÔÌá¸ß´úÂë¿É¶ÁÐÔ¡¢±ÜÃâ sql ×¢Èë¹¥»÷¡¢Ìá¸ßÐÔÄÜÓÐ×ÊÖú¡£Óï·¨£º@parameter_name £¬ÆäÖÐ parameter_name ÊDzÎÊýµÄÃû³Æ¡£

SQL ÖÐ @ ·ûºÅµÄ¼ÄÒå

ÔÚ SQL ÖÐ £¬@ ·ûºÅÓÃÓÚÖ¸¶¨Ò»¸ö²ÎÊý¡£²ÎÊýÊÇÅÌÎÊÖпɱäµÄ²¿·Ö £¬¿ÉÒÔÔÚÅÌÎʱ»Ö´ÐÐʱ±»²î±ðµÄÖµÌæ»»¡£

ÓÃ;

ʹÓà @ ·ûºÅÓм¸¸öÀûÒ棺

Ìá¸ß´úÂë¿É¶ÁÐÔ£ºÊ¹ÅÌÎʸüÒ×ÓÚÔĶÁºÍÃ÷È· £¬ÓÉÓÚ²ÎÊýÓëÏÖʵֵÍÑÀë¡£

±ÜÃâ SQL ×¢Èë¹¥»÷£ºÍ¨¹ý½«Óû§ÊäÈë×÷Ϊ²ÎÊýת´ï £¬¿ÉÒÔ±ÜÃâ¶ñÒâÓû§ÐÞ¸ÄÅÌÎʲ¢Ö´ÐÐδ¾­ÊÚȨµÄ²Ù×÷¡£

Ìá¸ßÐÔÄÜ£ºÍ¨¹ýʹÓòÎÊý»¯ÅÌÎÊ £¬Êý¾Ý¿â¿ÉÒÔÔ¤±àÒëÅÌÎʲ¢½«Æä´æ´¢ÔÚ»º´æÖÐ £¬´Ó¶øÌá¸ßÐÔÄÜ¡£

Óï·¨

ʹÓà @ ·ûºÅÖ¸¶¨²ÎÊýµÄÓï·¨ÈçÏ£º

@parameter_name

µÇ¼ºó¸´ÖÆ

ÆäÖÐ parameter_name ÊDzÎÊýµÄÃû³Æ¡£

ʾÀý

ÏÂÃæÊÇÒ»¸öʾÀýÅÌÎÊ £¬ÆäÖÐʹÓÃÁË @ ·ûºÅÖ¸¶¨Ò»¸öÃûΪ @age µÄ²ÎÊý£º

SELECT * FROM users WHERE age > @age;

µÇ¼ºó¸´ÖÆ

µ±Ö´ÐдËÅÌÎÊʱ £¬¿ÉÒÔÌṩ²î±ðµÄ @age ÖµÀ´²éÕÒ²î±ðÄêËê¶ÎµÄÓû§¡£ÀýÈ磺

-- ²éÕÒÄêËê´óÓÚ 30 ËêµÄÈË
SELECT * FROM users WHERE age > 30;

-- ²éÕÒÄêËê´óÓÚ 25 ËêµÄÈË
SELECT * FROM users WHERE age > 25;

µÇ¼ºó¸´ÖÆ

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

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

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