2020年6月28日星期日

plsql EXECUTE IMMEDIATE动态执行sql

select * from BANK t;DECLAREv_money bank.money%TYPE;BEGIN--简单执行sql,注意sql字符串不要带分号结束EXECUTE IMMEDIATE 'SELECT money FROM bank WHERE id = 5';--带参数,参数使用using传入,按顺序的传入EXECUTE IMMEDIATE 'SELECT money FROM bank WHERE id = :param1 or id =:param2'USING '4','5';--执行sql后,取值,using在赋值后面EXECUTE IMMEDIATE 'SELECT money FROM bank WHERE id = :param1'INTO v_moneyUSING '2';DBMS_OUTPUT.PUT_LINE( 'Column Variable: ' || v_money );END;

 

plsql EXECUTE IMMEDIATE动态执行sql海带Shopee店铺选品ShipBob亚马逊运营思维图亚马逊道歉!525被封账号大量解封!Prime Day亚马逊网站和APP大面积崩溃,仍有卖家频爆单!云南丽江旅游最佳路线云南丽江旅游最佳路线云南丽江旅游最佳路线

没有评论:

发表评论