User Tools

Site Tools


kurs:table_for_merge
drop table emp;

create table emp as select 
employee_id, 
first_name, last_name, salary, hire_date, department_id, 0 bonus from employees;

update emp set bonus = salary * (case when salary > 15000 then 0.1
                                      when salary > 10000 then 0.2
                                      else 0.3
                                      end)

delete from emp where bonus > 1700;

select count(*) from emp;
kurs/table_for_merge.txt · Last modified: 2014/09/10 21:22 (external edit)