oracle 9i 라고 기본 활용서가 있는데 거기에 있는 2장 문제를 풀어보쟈~~
select last_name, salary
from employees
where salary >= 12000;
select last_name, department_id
from employees
where EMPLOYEE_ID = 176;
select last_name, salary
from employees
where salary >5000 or salary <12000
--where salary not between 5000 and 12000 ;
select last_name, job_id, hire_date
from employees
where hire_date between '08/02/20' and '08/05/01';
select last_name, department_id
from employees
where department_id in (20 ,50)
order by last_name;
select last_name as employee, salary "Monthly Salary"
from employees
where salary between 5000 and 12000
and department_id in (20 ,50) ;
select last_name, hire_date
from employees
where hire_date like '04%';
select last_name, job_id
from employees
where manager_id IS NULL;
select last_name, salary, commission_pct
from employees
where commission_pct is not null
order by salary desc, commission_pct desc;
select last_name
from employees
where last_name like '__a%';
# _ _ 두개 써줬다. 3번째 문자라고 했으니까
select last_name
from employees
where last_name like '%a%'
and last_name like '%e%' ;
select last_name, job_id, salary
from employees
where job_id in('ST_CLERK' , 'SA_REP')
AND salary not in ('2500','3500','7000');
select last_name Employee, salary as "Monthly Salary", commission_pct
from employees
where commission_pct =0.2;
'SQL' 카테고리의 다른 글
ORA-02292 해결 방법 (0) | 2023.07.10 |
---|---|
[Oracle] 새 접속 만들기 (1) | 2023.05.14 |
SQL 문법 _ ③ order by (0) | 2023.03.19 |
SQL 문법 _ ② where (0) | 2023.03.19 |
SQL 문법 _ 오라클 9i introduction 1장 문제 (0) | 2023.03.14 |