Sie sind auf Seite 1von 2

================================================================================ ================================== //////>>>>>>> 2 PARCIAL <<<<<</////// --> select salary from employees order by salary; --> select first_name,

salary from employees where salary > 10000; --> union select first_name, salary from employees where salary < 3000; --> union select first_name, salary from employees where salary = 6200;

--> select first_name from employees union select department_name from departments;

[[[[ la instruccion "union" sirve para mostrar otras consultas llamadas desde e l mismo qwery. ]]]]

--> select first_name from employees union select from department_name from departments union select country_name from countries;

--> select first_name, last_name from employees where first_name like '%as%' union select first_name, last_name from employees where last_name like '%as%';

////////////////// PRACTICA Nom. 1 /////////////////////////////

1.- --> "" UNIR 2.- --> "" UNIR 3.- --> "" UNIR 4.- --> "" UNIR LETRA 'B' ""

LOS EMPLEADOS LOS PAISES DE LOS EMPLEADOS EMPLEADOS QUE

DE USA Y REINO UNIDO "" AMERICA Y EUROPA "" DE IT, RH, Admin, Marketing y Finanzas "" SUS NOMBRES CONTENGAN LA LETRA 'A' Y APELLIDO LA

>>>>>>>>>>>>> 1 <<<<<<<<<<<<<<<<< --> select first_name, country_name from employees, locations, countries, depart ments where employees.department_id=departments.department_id and departments.lo cation_id=locations.location_id and locations.country_id=countries.country_id an

d countries.country_id='US' union select first_name, country_name from employees, locations, countries, depart ments where employees.department_id=departments.department_id and departments.lo cation_id=locations.location_id and locations.country_id=countries.country_id an d countries.country_id='UK'; >>>>>>>>>>>>> 2 <<<<<<<<<<<<<<<<<< --> select country_name from countries where region_id=2 union select country_name from countries where region_id=1;

>>>>>>>>>>>>> 3 <<<<<<<<<<<<<<<<<< ===== IT > 60 ====== HR > 40 ====ADMIN > 10 === MARKETING > 20 ===FINANZAS > 100 --> select union select union select union select union select first_name,department_id from employees where department_id=60 first_name,department_id from employees where department_id=40 first_name,department_id from employees where department_id=10 first_name,department_id from employees where department_id=20 first_name,department_id from employees where department_id=100;

>>>>>>>>>>>> 4 <<<<<<<<<<<<<<<<<<< --> select first_name,last_name from employees where first_name like '%a%' union select first_name,last_name from employees where last_name like '%b%';

Das könnte Ihnen auch gefallen