Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CARGOS
- CREATE TABLE cargos (
- id serial primary key,
- cargo varchar,
- aumento numeric(7,2)
- );
- INSERT INTO cargos (cargo, aumento) values ('diretor', 1000), ('coordenador', 500), ('professor', 200);
- -- FUNCIONARIOS
- CREATE TABLE funcionarios (
- id serial primary key,
- nome varchar,
- salario numeric,
- cargo_id integer REFERENCES cargos(id),
- excluido boolean
- );
- INSERT INTO funcionarios (nome, salario, cargo_id, excluido) values ('Carlos', 2000, 3, true), ('João', 2500, 3, true), ('Thiago', 4000, 2, false), ('Marcio', 4300, 2, true), ('Diogo', 1200, 2, false), ('Maria', 5000, 1, true), ('Helena', 5000, 1, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement