欢迎各位兄弟 发布技术文章
这里的技术是共享的
--虫琩高
--(1)тΤ禬筁1场
SELECT deptno, COUNT (*)
FROM emp
WHERE sex = '0'
GROUP BY deptno
HAVING COUNT (*) > 1
ORDER BY deptno;
--(2)т材ダM秨繷┮Τ
SELECT *
FROM emp
WHERE ename LIKE 'M%'
--(3)т┮Τ场恨
select distinct(BOSS)
from dept
where boss is not null;
--(4)т┦(DECODE and CASE ノ猭)
SELECT EMPNO, ENAME, DECODE (sex, 0, '', 1, '╧', '┦ゼ恶') sex
FROM emp;
SELECT empno,
ename,
CASE sex WHEN '0' THEN '' WHEN '1' THEN '╧' ELSE '┦ゼ恶' END sex
FROM emp;
--(5)ъさぱら戳㎝丁
select to_char(sysdate,'yyyymm') from dual;
--琩高
--A.ぃ逆(舱)
---------------------------------------------------10贺JOIN----------------------------------------------
--(1)陪ボ┮Τ,ㄏ硂侗临⊿Τ场 (left join)
SELECT E.EMPNO,
E.ENAME,
D.DEPTNO,
D.DNAME
FROM EMP E,DEPT D
WHERE E.DEPTNO=D.DEPTNO(+);
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e LEFT JOIN dept d
ON e.DEPTNO = d.DEPTNO;
--(2)陪ボ┮Τ场,ㄏ硂场临⊿Τ(right join)
SELECT E.EMPNO,
E.ENAME,
D.DEPTNO,
D.DNAME
FROM EMP E,DEPT D
WHERE E.DEPTNO(+)=D.DEPTNO;
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e RIGHT JOIN dept d
ON e.DEPTNO = d.DEPTNO;
--(3)陪ボ┮Τ,ㄏ硂临⊿Τ场 and 陪ボ┮Τ场,ㄏ硂场临⊿Τ(outer join)
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e, dept d
WHERE e.DEPTNO= d.DEPTNO(+)
union --璝эノunion all 玥ぃ埃滦
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e, dept d
WHERE e.DEPTNO(+)= d.DEPTNO;
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e full outer join dept d
on e.deptno=d.deptno;
--(4)琩⊿Τ场(left excluding join)
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e, dept d
WHERE e.DEPTNO = d.DEPTNO(+)
AND d.DEPTNO IS NULL;
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e LEFT JOIN dept d
on e.DEPTNO = d.DEPTNO
where d.DEPTNO IS NULL;
--(5)琩⊿Τ场(right excluding join)
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e, dept d
WHERE e.DEPTNO(+) = d.DEPTNO
AND e.DEPTNO IS NULL;
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e right JOIN dept d
ON e.DEPTNO = d.DEPTNO
WHERE e.deptno is null;
--(6)琩⊿Τ场 and 琩⊿Τ场(outer excluding join)
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e, dept d
WHERE e.DEPTNO= d.DEPTNO(+)
and d.deptno is null
union
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e, dept d
WHERE e.DEPTNO(+)= d.DEPTNO
and e.deptno is null;
SELECT e.empno,
e.ename,
d.deptno,
d.dname
FROM emp e full outer join dept d
on e.deptno=d.deptno
where e.deptno is null or d.deptno is null;
--(7)Τ场 and Τ场(Inner Join)
SELECT E.EMPNO,
E.ENAME,
D.DEPTNO,
D.DNAME
FROM EMP E,DEPT D
WHERE E.DEPTNO=D.DEPTNO;
SELECT E.EMPNO,
E.ENAME,
D.DEPTNO,
D.DNAME
FROM EMP E INNER JOIN DEPT D
ON E.DEPTNO=D.DEPTNO ;
SELECT E.EMPNO,
E.ENAME,
DEPTNO,
D.DNAME
FROM EMP E JOIN DEPT D USING (DEPTNO);
SELECT EMPNO,
ENAME,
DEPTNO,
DNAME
FROM EMP E JOIN DEPT D USING (DEPTNO);
--(8)Τ场 and Τ场(Nature Join)
SELECT *
FROM emp e natural JOIN dept d;
--(9)琩ㄢ┮Τ舱Θ戈癟(Cross Join)
SELECT * FROM EMP,DEPT;
--(10)Self Join
--- <1>琩攫┮Τ竊翴
select parent,child
from org
start with parent is null
connect by prior child=parent;
---<2>琘竊翴┕發┮Τ竊翴
select parent
from org
start with child = 'A20'
connect by prior parent=child;
---<3>琘竊翴┕甶秨┮Τ竊翴
select child
from org
start with parent = 'A20'
connect by prior child=parent;
--B.逆(舱)
---------------------------------------------------4贺JOIN----------------------------------------------
--union all,union,intersect,minus
--(1)ρ狾稱璶笵┮Τ讽玡虫ヴ㎝玡┮踞ヴ筁戮
select empno,jobno
from emp
union all
select empno,jobno
from job_history;
--(2)ρ狾稱璶笵┮Τ讽玡虫ヴ㎝玡┮踞ヴ筁戮,璶―ぃ確计沮
select empno,jobno
from emp
union
select empno,jobno
from job_history;
--(3)ρ狾稱璶笵Τㄇ瞷┮踞ヴ筁戮,筁筁
select empno,jobno
from emp
intersect
select empno,jobno
from job_history;
--(4)ρ狾稱璶笵Τㄇ筁戮⊿Τ跑て
select empno,jobno
from emp
minus
select empno,jobno
from job_history;
--琩高
--(1)碠甅琩高
--<1>т本MIS┏┮Τ场嘿
SELECT dname
FROM dept
WHERE deptno IN ( SELECT child
FROM org
START WITH parent = (SELECT DEPTNO
FROM DEPT
WHERE DNAME = 'MIS')
CONNECT BY PRIOR child = parent);
--(2)闽羛琩高
--<1>琩–贺盺э盺キА羱(非称羱)
--糶猭1
SELECT jobno,
empno,
ename,
total
FROM (SELECT e.empno,
e.ename,
e.jobno,
(s.wage + NVL (S.ALLOWANCE, 0)) total
FROM EMP E, SALARY S
WHERE E.EMPNO = S.EMPNO) x
WHERE x.total < ( SELECT AVG (s.wage + NVL (s.allowance, 0))
FROM salary s, emp e
WHERE s.empno = e.empno AND e.jobno = X.jobno
GROUP BY jobno)
ORDER BY total DESC;
--糶猭2
WITH X
AS (SELECT e.empno,
e.ename,
e.jobno,
(s.wage + NVL (S.ALLOWANCE, 0)) total
FROM EMP E, SALARY S
WHERE E.EMPNO = S.EMPNO)
SELECT jobno,
empno,
ename,
total
FROM x
WHERE total < ( SELECT AVG (s.wage + NVL (s.allowance, 0))
FROM salary s, emp e
WHERE s.empno = e.empno AND e.jobno = x.jobno
GROUP BY jobno)
ORDER BY TOTAL DESC;
--<2>琩⊿Τ场 (=LEFT EXCLUDING JOIN )
SELECT EMPNO,ENAME
FROM EMP E
WHERE NOT EXISTS (SELECT 1
FROM DEPT
WHERE DEPTNO=E.DEPTNO);
--<3>琩⊿Τ场 (=RIGHT EXCLUDING JOIN )
SELECT DEPTNO,DNAME
FROM DEPT D
WHERE NOT EXISTS (SELECT 'X'
FROM EMP E
WHERE E.DEPTNO=D.DEPTNO);
----------------------------------------------干------------------------------------------------
--干(1)
--cusor 虫糷ノ猭 (癸┮ΤуΩ秸羱)
DECLARE
CURSOR c
IS
SELECT * FROM emp;
BEGIN
FOR c1 IN c
LOOP
UPDATE salary
SET allowance = 50
WHERE allowance IS NULL;
COMMIT;
END LOOP;
END;
--cursor ざ残
--cursor 蛮糷ノ猭倒 (癸恨уΩ秸羱)
DECLARE
CURSOR c1
IS
SELECT BOSS FROM dept;
CURSOR d1 (V_BOSS VARCHAR2)
IS
SELECT *
FROM SALARY
WHERE EMPNO = V_boss;
BEGIN
FOR c IN c1
LOOP
FOR d IN d1 (c.BOSS)
LOOP
UPDATE salary
SET allowance = allowance + 888
WHERE empno = d.empno;
END LOOP;
END LOOP;
END;
--recursiveざ残
--<1> recursive (procedure)
create procedure tomkuoPro( p_num number ) is
v_num number;
begin
-- 陪ボセΩ挡狦
dbms_output.put_line( to_char(p_num) );
if p_num > 0 then
v_num := p_num - 1;
-- Call
tomkuoPro( v_num );
end if;
end;
--<2>recursive (function)
CREATE OR REPLACE FUNCTION FN_RECURSIVE_TEST(COUNTLIMIT NUMBER,
INITNUMBER NUMBER DEFAULT 0)
RETURN NUMBER IS
RESULT NUMBER;
BEGIN--
RESULT := INITNUMBER;
IF COUNTLIMIT > 2011 THEN
RESULT := FN_RECURSIVE_TEST(COUNTLIMIT - 1, INITNUMBER + 1);
END IF;
RETURN(RESULT);
END FN_RECURSIVE_TEST;
--Recursive龟ㄒ莱ノ(bom_qry2.fmb) --絏琌玡磅︽
/*
procedure show_bom_child1(v_parent varchar2) is
t_parent varchar2(30);
t_type varchar2(20);
t_level varchar2(20);
v_seq number(6) := 0;
cursor c1 is
select parent,child,qty, --ダン腹,ン腹,虫ノ秖
start_date,end_date,description, --币ノら,氨ノら,珇
item_type,ref_partno,unit, --摸,瓜腹,虫
eco_no,implementation_date,matl_cntrl_resp, --砞跑跑虫腹,ネら,砯恨北
select_ch_db('MRP01',mrp01) mrp01 --籹潦
from bom
where nvl(parent, ' ') = nvl(v_parent, ' ')
and (start_date <= :p_date or :p_date is null)
and (end_date >= :p_date or :p_date is null or end_date is null)
order by child;
begin
go_block('DETAIL');
for c in c1 loop
:parameter.seq := :parameter.seq + 1;
:detail.seq := :parameter.seq;
v_seq := v_seq + 1;
:detail.seq := v_seq;
:detail.item_type := null;
:detail.parent := c.parent;
:detail.lev := :global.level;
:detail.qty := c.qty;
:detail.unit := c.unit;
:detail.eco_no := c.eco_no;
:detail.implementation_date := c.implementation_date;
:detail.item_type := select_ch_db('ITEM_TYPE_DESC',
c.item_type);
:detail.mrp01 := c.mrp01;
:detail.matl_cntrl_resp := c.matl_cntrl_resp;
:detail.start_date := c.start_date;
:detail.end_date := c.end_date;
t_level := :global.level;
c.description := c.description;
c.child := c.child;
c.ref_partno := c.ref_partno;
:detail.child := get_level_space(t_level) || c.child || chr(9) ||
c.description || chr(9) || c.ref_partno;
:detail.t_child := c.child;
next_record;
if :global.level <= 10 then
:global.level := to_char(to_number(:global.level) + 1);
show_bom_child1(c.child);
:global.level := t_level;
end if;
end loop;
end;
*/
----------------------------------------------------------------------------------------------------------------------
--干(2)
----猔種ROWNUM 籔 ROWID ぃRowid 琌础癘魁ネΘROWNUM 琌琩高计沮ネΘ-----ROWID 夹醚琌︽瞶ROWNUM 夹醚琌琩高挡狦い︽Ω
--т羱玡
select rowid,rownum,empno ,ename,total
from (select s.empno,e.ename,s.wage+nvl(allowance,0) as total
from salary s ,emp e
where s.empno=e.empno
order by (wage+nvl(allowance,0)) desc)
where rownum <=3;
------猔種oracle pseudocolumn 盽ǎΤROWID,ROWNUM,LEVEL,ㄤいLEVEL self join 穦玻ネ逆
--- 琩攫┮Τ竊翴
select parent,child,level
from org
start with parent is null
connect by prior child=parent;
--干(3)
---- oralce ㄏノ贺 AND , OR , NOT 呸胯,贺篈(or data) FALSE(0),TRUE(1 or other value),NULL
---- OR : TRUE-->NULL-->FALSE ; AND : FALSE-->NULL-->TRUE
select *
from dept
where deptno='A23' AND BOSS IS NULL;
select *
from dept
where deptno='A23' AND BOSS = NULL;
--干(4)
--籔ら戳闽ㄧ计莱ノ
--ъヘ玡丁
--ъ丁
select sysdate from dual;
--奔だ
select trunc(sysdate)
from dual;
--ら戳锣て﹃
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
--莉丁
select to_char(sysdate,'yyyy') from dual;
--莉丁る
select to_char(sysdate,'mm') from dual;
--莉丁ら
select to_char(sysdate,'dd') from dual;
--莉丁
--24秈计
select to_char(sysdate,'hh24') from dual;
--12秈计
Select to_char(sysdate,'HH') from dual;
Select to_char(sysdate,'HH12') from dual;
--莉丁だ
select to_char(sysdate,'mi') from dual;
--莉丁
select to_char(sysdate,'ss') as nowSecond from dual;
--讽㏄材碭ぱ
Select to_char(sysdate,'D') from dual;
--讽㏄琍戳碭
Select to_char(sysdate,'DY') from dual;
--讽る材碭ぱ
Select to_char(sysdate,'DD') from dual;
--讽材碭ぱ
Select to_char(sysdate,'DDD') from dual;
--るぱ
select to_char(add_months(last_day(sysdate)+1,-2),'yyyy-MM-dd') from dual;
--るさぱ
select to_char(add_months(sysdate,-1),'yyyy-MM-dd') PreToday from dual;
--るソぱ
select to_char(add_months(last_day(sysdate),-1),'yyyy-MM-dd') from dual;
--セる材ぱ
select to_char(trunc(sysdate,'MONTH'),'yyyy-mm-dd') from dual;
--セる程ぱ
Select last_day(sysdate) from dual;
--セる材琍戳
SELECT NEXT_DAY (
TO_DATE (TO_CHAR (SYSDATE, 'yyyy-mm') || '-01', 'yyyy-mm-dd'),
'琍戳')
FROM DUAL;
--讽ら琌セる材碭㏄
SELECT TO_CHAR (SYSDATE, 'w') FROM dual;
--讽玡ら戳┕玡┪癶碭る
Select add_months(sysdate,2) from dual;
--眔琘るぱ计
SELECT TRUNC (LAST_DAY (SYSDATE))
- TO_DATE (TO_CHAR (SYSDATE, 'yyyy-mm') || '-01', 'yyyy-mm-dd')
+ 1
FROM DUAL;
--耞琌秥
SELECT DECODE (
TO_CHAR (
LAST_DAY (
TO_DATE (TO_CHAR (SYSDATE, 'yyyy') || '-02-01', 'yyyy-mm-dd')),
'dd'),
'28', 'キ',
'秥')
FROM DUAL;
--璶т琘るい┮Τ秅きㄣ砰ら戳
SELECT TO_CHAR (b.a, 'YYYY/MM/DD')
FROM (SELECT TRUNC (SYSDATE, 'mm') + ROWNUM - 1 a
FROM dba_objects
WHERE ROWNUM < 32) b
WHERE TO_CHAR (b.a, 'day') = '琍戳き';
--狦рwhere to_char(t.d, 'MM') = to_char(sysdate, 'MM')эΘsysdate-90琩т讽玡る玡るい–秅きら戳
--酚–秅秈︽参璸
select to_char(sysdate,'ww') from dual group by to_char(sysdate,'ww');
--酚–る秈︽参璸
select to_char(sysdate,'mm') from dual group by to_char(sysdate,'mm');
--酚–﹗秈︽参璸
select to_char(sysdate,'q') from dual group by to_char(sysdate,'q');
--酚–秈︽参璸
select to_char(sysdate,'yyyy') from dual group by to_char(sysdate,'yyyy');
--Months_between(f,s)ら戳f㎝s丁畉る计
select months_between(sysdate,to_date('2005-11-12','yyyy-mm-dd'))from dual;
extract()тら戳┪丁筳逆
-- date_value:=extract(date_field from [datetime_value|interval_value])
--ъる
select extract(month from sysdate) "This Month" from dual;
--ъ
select extract(year from add_months(sysdate,36)) " Years" from dual;
--EXAMPLE
DROP TABLE EMP;
CREATE TABLE EMP
(
empno varchar2(10 byte) PRIMARY KEY,
ename varchar2(20 byte),
sex varchar2(1 byte),
jobno varchar2(20 byte),
deptno varchar2(10 byte)
);
DROP TABLE JOB;
CREATE TABLE JOB
(
jobno varchar2(10 byte) PRIMARY KEY,
jname varchar2(20 byte)
);
DROP TABLE DEPT;
CREATE TABlE DEPT
(
DEPTNO varchar2(10 byte) PRIMARY KEY,
DNAME varchar2(20 byte),
BOSS varchar2(10 byte)
);
DROP TABLE SALARY;
CREATE TABLE SALARY
(
EMPNO VARCHAR2 (10 BYTE) PRIMARY KEY,
WAGE NUMBER (10) NOT NULL,
ALLOWANCE NUMBER (10)
);
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2001', 'VENUS', '0', 'J01', 'A00');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2010', 'MIKE', '1', 'J02', 'A10');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2008', 'MICHELLE', '0', 'J04', 'A10');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2018', 'JOHN', '1', 'J05', 'A10');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2002', 'KEVIN', '1', 'J02', 'A20');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2011', 'BEN', '1', 'J03', 'A21');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2004', 'DENNIS', '1', 'J04', 'A22');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2015', 'BILLY', '1', 'J05', 'A23');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2005', 'ALICE', '0', 'J04', 'A23');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2007', 'JOE', '0', 'J04', 'A23');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2003', 'MARKS', '1', 'J04', 'A24');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2016', 'POKY', '1', 'J04', 'A24');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2017', 'JUDY', '0', 'J02', 'A40');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2006', 'FRANK', '1', 'J05', 'A40');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO)
Values
('2009', 'BOLIN', '1', 'J05');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX)
Values
('2019', 'SAM', '1');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2020', 'JIMY', '1', 'J05', 'A40');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2014', 'CINDERELLA', '0', 'J02', 'A50');
Insert into APPS.EMP123
(EMPNO, ENAME, SEX, JOBNO, DEPTNO)
Values
('2012', 'KELLY', '0', 'J05', 'A50');
Insert into APPS.EMP123
(EMPNO, ENAME, DEPTNO)
Values
('2013', 'JENNY', 'A60');
COMMIT;
Insert into APPS.JOB123
(JOBNO, JNAME)
Values
('J01', 'GM');
Insert into APPS.JOB123
(JOBNO, JNAME)
Values
('J02', 'MANAGER');
Insert into APPS.JOB123
(JOBNO, JNAME)
Values
('J03', 'TEAM LEADER');
Insert into APPS.JOB123
(JOBNO, JNAME)
Values
('J04', 'ENGINEER');
Insert into APPS.JOB123
(JOBNO, JNAME)
Values
('J05', 'ASSISTANT');
COMMIT;
Insert into APPS.DEPT123
(DEPTNO, DNAME, BOSS)
Values
('A00', 'SZS', '2001');
Insert into APPS.DEPT123
(DEPTNO, DNAME, BOSS)
Values
('A10', 'SD', '2010');
Insert into APPS.DEPT123
(DEPTNO, DNAME, BOSS)
Values
('A20', 'MIS', '2002');
Insert into APPS.DEPT123
(DEPTNO, DNAME, BOSS)
Values
('A21', 'HW', '2011');
Insert into APPS.DEPT123
(DEPTNO, DNAME, BOSS)
Values
('A22', 'SW', '2004');
Insert into APPS.DEPT123
(DEPTNO, DNAME)
Values
('A23', 'ERP');
Insert into APPS.DEPT123
(DEPTNO, DNAME)
Values
('A24', 'HR');
Insert into APPS.DEPT123
(DEPTNO, DNAME, BOSS)
Values
('A30', 'QA', '2002');
Insert into APPS.DEPT123
(DEPTNO, DNAME, BOSS)
Values
('A40', 'WH', '2017');
Insert into APPS.DEPT123
(DEPTNO, DNAME, BOSS)
Values
('A50', 'TR', '2014');
COMMIT;
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2001', 12000, 1000);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2002', 9000, 800);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2003', 3500, 200);
Insert into APPS.SALARY123
(EMPNO, WAGE)
Values
('2004', 4000);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2005', 2500, 500);
Insert into APPS.SALARY123
(EMPNO, WAGE)
Values
('2006', 3000);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2007', 5000, 200);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2008', 4000, 200);
Insert into APPS.SALARY123
(EMPNO, WAGE)
Values
('2009', 3000);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2010', 8800, 800);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2011', 9200, 200);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2012', 7000, 200);
Insert into APPS.SALARY123
(EMPNO, WAGE)
Values
('2013', 8000);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2014', 6600, 500);
Insert into APPS.SALARY123
(EMPNO, WAGE)
Values
('2015', 3800);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2016', 3500, 200);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2017', 6600, 500);
Insert into APPS.SALARY123
(EMPNO, WAGE)
Values
('2018', 4500);
Insert into APPS.SALARY123
(EMPNO, WAGE)
Values
('2019', 3200);
Insert into APPS.SALARY123
(EMPNO, WAGE, ALLOWANCE)
Values
('2020', 3600, 200);
COMMIT;