Buscar

Tabela Oracle

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

SELECT * FROM ALL_TABLES;
select * from JOBS
select * from employees
select * from DEPARTMENTS
select j.job_title, e.FIRST_NAME, e.LAST_NAME, e.SALARY, d.DEPARTMENT_NAME from jobs j
 inner join employees e
 on j.job_id = e.job_id
 inner join departments d
 on e.department_id = d.department_id
select * from JOB_HISTORY
select * from REGIONS
select * from COUNTRIES
select * from LOCATIONS
select r.REGION_NAME, c.COUNTRY_NAME, l.STREET_ADDRESS, l.POSTAL_CODE, l.CITY, l.STATE_PROVINCE	from regions r
 inner join countries c
 on r.REGION_ID = c.REGION_ID
 inner join locations l
 on c.COUNTRY_ID = l.COUNTRY_ID
select * from employees 
select hire_date from employees order by hire_date
select * from employees where hire_date between '09/17/2003' and '01/13/2008' order by hire_date;
select first_name, last_name, hire_date, salary from employees where salary between 2200 and 17000 order by salary
select first_name, last_name, salary from employees where salary 
between 0 and 3000 or salary >= 5000 order by salary
select department_id, department_name , manager_id, location_id 
from departments where location_id between 1500 and 2000
select d.department_name, l.city from departments d
inner join locations l
on d.location_id = l.location_id 
where l.city = 'Sao Paulo'
select max(salary) from employees
select min(salary) from employees
select avg(salary) from employees
select sum(salary) from employees
select * from countries order by country_name
-- Primeira letra é I.
select country_name from countries where country_name like 'I%'
-- Ultima letra é A.
select country_name from countries where country_name like '%a'
-- Segunda letra é A.
select country_name from countries where country_name like '_a%'
-- Duas letras diferentes
select country_name from countries where country_name like '[ab]%'
select * from JOBS
select * from employees order by salary
select * from DEPARTMENTS
select * from REGIONS
select * from COUNTRIES
select * from LOCATIONS

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Outros materiais