Replies: 1 comment
-
merge into emp e
using emp_copy on (e.empno = c.empno)
when matched then update
set e.ename = c.ename, e.de[tno = c.deptno, e.sal = c.sal
when not matched then insert (empno, ename, deptno, sal) values
(c.empno, c.ename, c.deptno, c.sal);select empno, ename, deptno
from emp
where deptno = 30 and exists(
select 1
from emp
where empno = 7698);
select sum(a), sum(b) from (
select 1, 0 from dual
union all
select 0, 1 from dual
) a;create index emp_idx on emp(sal desc);select *
from (
select *
from emp)
where rownum <= 5;
select case empno when 1 then 'A' else 'B' end from emp;
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment






Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[이기적] SQLD 실전 모의고사 150제 - 2과목
p255 ~ p309
no.31 ~ no.150
Beta Was this translation helpful? Give feedback.
All reactions