Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create database scel;
- use scel;
- create table depto(
- codDepto int not null auto_increment,
- nomDepto varchar(10),
- primary key(codDepto)
- );
- insert into depto(nomDepto) values
- ('Esportes'),
- ('Lazer'),
- ('Cultura');
- create table funcionario(
- regiFunc int not null,
- nomeFunc varchar(30) not null,
- sexoFunc CHAR(1) CHECK (SexoFunc='F' OR SexoFunc='M'),
- cargFunc varchar(20),
- locaFunc varchar(30),
- codDepto int,
- cargHora int,
- horaTrab varchar(50),
- regiTrab varchar(20),
- observac varchar(100),
- fotoFunc varchar(30),
- primary key(regiFunc),
- CONSTRAINT Fk_Depto FOREIGN KEY(codDepto) REFERENCES depto(codDepto)
- );
- insert into funcionario(regiFunc, nomeFunc, sexoFunc, cargFunc, locaFunc, codDepto, cargHora, horaTrab, regiTrab, observac, fotoFunc) values
- (20072, 'José Sanches', 'M', 'Agente Administrativo', 'Ginásio Pedro Stevão', 1, 40, '13:00 às 16:00 e das 17:oo às 22:00', 'CLT', '', '\imagens\20072.jpg'),
- (20300, 'Maria das Dores', 'F', 'Agente Administrativo', 'Gabinete', 2, 40, '8:00 às 12:00 e das 13:oo às 17:00', 'CLT', 'afastada', '\imagens\20300.jpg');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement