常用dml和query开并行 --开并行 ALTER SESSION FORCE PARALLEL DML PARALLEL 16; ALTER SESSION FORCE PARALLEL QUERY PARALLEL 16; --关并行 ALTER SESSION DISABLE PARALLEL DML ; ALTER SESSION DISABLE PARALLEL QUERY; 索引开并行 drop index IDX_SB_SBZT_LRRQ; create index IDX_SB…
1.使用函数读取员工工资. ①数据结构工资结果 DATA: GT_RGDIR TYPE TABLE OF PC261 , GS_RGDIR TYPE PC261 , GT_PAYRESULT TYPE PAYCN_RESULT , GS_RT TYPE PC207 , GV_NR TYPE PC261-SEQNR. GET PERNR. CALL FUNCTION 'CU_READ_RGDIR' EXPORTING PERSNR = PERNR-PERNR * BUFFER = * NO_AUT…
--根据每个部门来统计部门工资总和 select deptid, sum(sal) 工资合计 from emp group by deptid; --根据每个部门来统计部门工资总和select deptid, 工资合计, sum(工资合计) over() as 总合计 from (select deptid, sum(sal) 工资合计 from emp group by deptid) x; select deptid 部门, 工资合计, 总…