-- Created on 2019/3/22 by ADMINISTRATOR declare -- Local variables here i integer; begin -- Test statements here select count(1) into i from BIGDATA_YXXT.M_ZW_SQGDQDB where id=1; if i > 0 then dbms_output.put_line('數據存在!'); update BIGDATA_YXXT.M_ZW_SQGDQDB set ORDER_CODE='mmmmmm' where id=1 ; else insert into BIGDATA_YXXT.M_ZW_SQGDQDB(ORDER_CODE)values('shouwme'); dbms_output.put_line('數據插入!'); end if; end;