查询结果中有多个字段,将这多个字段同时赋值给多个变量的写法:
oracle sql code
DECLARE XM1 VARCHAR(10); XM2 VARCHAR(10); XM3 VARCHAR(10);BEGIN SELECT XIANGM1,XIANGM2,XIANGM3 INTO XM1,XM2,XM3 FROM MENZFP WHERE FAPH='001500001017' AND MENZH='00003158';END;