oracleÖÐ:=ÊÇʲôÒâ˼
oracle Öеĸ³ÖµÔËËã·ûΪ :=£¬ÓÃÓÚ½«Öµ·ÖÅɸø±äÁ¿»ò±í´ïʽ£¬Ëü½¨ÉèÒ»¸öеıäÁ¿»òÌæ»»ÏÖÓбäÁ¿£¬²¢½«ÆäÉèÖÃΪµÈºÅÓÒ²à±í´ïʽµÄÖµ¡£
Oracle Öеĸ³ÖµÔËËã·û :=
:= ÊÇ Oracle Öеĸ³ÖµÔËËã·û£¬ÓÃÓÚ½«Öµ·ÖÅɸø±äÁ¿»ò±í´ïʽ¡£ËüµÄÊÂÇé·½·¨ÊÇÔڵȺÅ×ó²à½¨ÉèÒ»¸öеıäÁ¿»òÌæ»»ÏÖÓбäÁ¿£¬²¢½«ÆäÉèÖÃΪµÈºÅÓÒ²à±í´ïʽµÄÖµ¡£
Óï·¨£º
variable_or_expression := expression;
µÇ¼ºó¸´ÖÆ
ÆäÖУº
variable_or_expression ÊÇÒª¸³ÖµµÄ±äÁ¿»ò±í´ïʽ¡£
expression ÊÇÒª·ÖÅɸø±äÁ¿µÄ±í´ïʽ¡£
ʹÓÃʾÀý£º
-- ½¨Éè±äÁ¿²¢¸³Öµ DECLARE my_variable NUMBER; BEGIN my_variable := 10; END;
µÇ¼ºó¸´ÖÆ
-- ÐÞ¸ÄÏÖÓбäÁ¿µÄÖµ DECLARE my_variable NUMBER := 10; BEGIN my_variable := my_variable + 5; -- my_variable ÏÖÔÚΪ 15 END;
µÇ¼ºó¸´ÖÆ
×¢ÖØÊÂÏ
¸³ÖµÔËËã·ûÊDz»¿ÉÄæµÄ£¬¼´Ëü²»»áÐÞ¸ÄÓÒ²à±í´ïʽµÄÖµ¡£
ÈôÊÇÓÒ²à±í´ïʽÊÇ NULL£¬Ôò±äÁ¿Ò²»á±»ÉèÖÃΪ NULL¡£
Ö»Äܽ«Öµ·ÖÅɸø±äÁ¿£¬²»¿É·ÖÅɸø±í´ïʽ¡£
¸³ÖµÓï¾ä°´Ë³ÐòÖ´ÐС£ÕâÒâζ×űäÁ¿ÔÚ·ÖÅÉ֮ǰ¿ÉÄÜÉÐδ³õʼ»¯¡£
ÒÔÉϾÍÊÇoracleÖÐ:=ÊÇʲôÒâ˼µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡