????repeat????α?
????????????:
/*????????*/
DELIMITER//
DROPPROCEDUREIFEXISTStest//
CREATEPROCEDUREtest()
BEGIN
DECLAREdoneINTDEFAULT0;
DECLAREaVARCHAR(200)DEFAULT'';
DECLAREcVARCHAR(200)DEFAULT'';
DECLAREmycursorCURSORFORSELECTfusernameFROMuchome_friend;
DECLARECONTINUEHANDLERFORNOTFOUNDSETdone=1;
OPENmycursor;
REPEAT
FETCHmycursorINTOa;
IFNOTdoneTHEN
SETc=CONCAT(c??a);/*????????*/
ENDIF;
UNTILdoneENDREPEAT;
CLOSEmycursor;
SELECTc;
END//
DELIMITER;
????????????:
/*????????*/
DELIMITER//
DROPPROCEDUREIFEXISTStest//
CREATEPROCEDUREtest()
BEGIN
DECLAREdoneINTDEFAULT0;
DECLAREaVARCHAR(200)DEFAULT'';
DECLAREcVARCHAR(200)DEFAULT'';
DECLAREmycursorCURSORFORSELECTfusernameFROMuchome_friend;
DECLARECONTINUEHANDLERFORNOTFOUNDSETdone=1;
OPENmycursor;
REPEAT
FETCHmycursorINTOa;
IFNOTdoneTHEN
SETc=CONCAT(c??a);/*????????*/
ENDIF;
UNTILdoneENDREPEAT;
CLOSEmycursor;
SELECTc;
END//
DELIMITER;