常用技巧
存储过程中,如何在字符串中使用变量
例: select to_char(sysdate,'yyyymmdd') into v_yyyymmdd from dual; execute immediate('create table tableName_bk_' || v_yyyymmdd || ' as select * from TableName');
将A表和B表进行关联,将符合关联条件的B表字段值更新至A表
update TableA a set a1,a2,a3=(select b1,b2,b3 from TableB b where a.column_name1 = b.column_name1 and a.column_name2 = b.column_name2 and ...)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------