Created
September 30, 2014 21:53
-
-
Save lzfelix/71ebca7b845e499b01ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into departamento(DNOME, DNUMERO, GERSSN, GERDATAINICIO) values | |
('Pesquisa', 5, null, '1988-05-22'), | |
('Administração', 4, null, '1995-01-01'), | |
('Sede administrativa', 1, null, '1981-06-19'); | |
insert into empregado(PNOME, MINICIAL, UNOME, SSN, DATANASC, ENDERECO, SEXO, SALARIO, SUPERSSN, DNO) values | |
('James', 'E', 'Borg', 888665555, '1937-11-10', '450 Stone, Houston, TX', 'M', 55000, null, 4), | |
('Franklin', 'T', 'Wong', 333445555, '1955-12-08', '638 Voss, Houston, TX', 'M', 40000, 888665555, 5), | |
('John', 'B', 'Smith', 123456789, '1965-01-09', '731 Fondren, Houston, TX', 'M', 30000, 333445555, 5), | |
('Jennifer', 'S', 'Wallace', 987654321, '1941-06-20', '291 Berry, Houston, TX', 'F', 43000, 888665555, 4), | |
('Alicia', 'J', 'Zelaya', 999887777, '1968-01-19', '3321 Castle, Houston, TX', 'F', 25000, 987654321, 4), | |
('Ramesh', 'K', 'Narayan', 666884444, '1962-09-15', '975 Fire Oak, Houston, TX', 'M', 38000, 333445555, 5), | |
('Joyce', 'A', 'English', 453453453, '1972-07-31', '5631 Rice, Houston, TX', 'F', 25000, 333445555, 5), | |
('Ahmad', 'V', 'Jabbar', 987987987, '1969-03-29', '980 Dallas, Houston, TX', 'M', 25000, 987654321, 4); | |
update departamento set gerssn=333445555 where DNUMERO=5; | |
update departamento set gerssn=987654321 where DNUMERO=4; | |
update departamento set gerssn=888665555 where DNUMERO=1; | |
insert into dept_localidades(dnumero, dlocalizacao) values | |
(1, 'Houston'), | |
(4, 'Stafford'), | |
(5, 'Bellaire'), | |
(5, 'Sugarland'), | |
(4, 'Houston'); | |
insert into projeto(pjnome, pnumero, plocalizacao, dnum) values | |
('ProdutoX', 1, 'Belaire', 5), | |
('ProdutoY', 2, 'Sugarland', 5), | |
('ProdutoZ', 3, 'Houston', 5), | |
('Automação', 10, 'Stafford', 4), | |
('Reorganização', 20, 'Houston', 1), | |
('Novos Benefícios', 30, 'Stafford', 4); | |
insert into dependentes(essn, nome_dependente, sexo, datanasc, parentesco) values | |
(333445555, 'Alice', 'F', '1985-04-05', 'FILHA'), | |
(333445555, 'Theodore', 'M', '1983-10-25', 'FILHO'), | |
(333445555, 'Joy', 'F', '1958-05-03', 'CÔNJUGE'), | |
(987654321, 'Abner', 'M', '1942-02-28', 'CÔNJUGE'), | |
(123456789, 'Michael', 'M', '1968-01-04', 'FILHO'), | |
(123456789, 'Alice', 'F', '1988-12-30', 'FILHA'), | |
(123456789, 'Elizabeth', 'F', '1967-05-25', 'CÔNJUGE'); | |
insert into trabalha_em(essn, pno, horas) values | |
(123456789, 1, 32.5), | |
(123456789, 2, 7.5), | |
(666884444, 3, 40), | |
(453453453, 1, 20), | |
(453453453, 2, 20), | |
(333445555, 2, 10), | |
(333445555, 3, 10), | |
(333445555, 10, 10), | |
(333445555, 20, 10), | |
(999887777, 30, 30), | |
(999887777, 10, 10), | |
(987987987, 10, 35), | |
(987987987, 30, 5), | |
(888665555, 20, null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment