Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE DATABASE quitanda2;
- USE quitanda2;
- CREATE TABLE cliente (
- codigo_cliente INT not null,
- nome_cleinte VARCHAR (20) not null,
- endereco VARCHAR (30) not null,
- cidade VARCHAR (15) not null,
- CEP VARCHAR (8) not null,
- UF CHAR (2) not null,
- cpf_cnpj VARCHAR (20) not null,
- IE VARCHAR (20),
- tipo_cliente CHAR (1) not null
- );
- CREATE TABLE pedido (
- num_pedido INT not null,
- codigo_cliente INT (11) not null,
- codigo_vendedor INT (11) not null,
- d4ta DATETIME,
- prazo_entrega INT (11) not null,
- valor_total DECIMAL (11) not null,
- forma_pgto CHAR (3) not null,
- pago BIT not null
- );
- CREATE TABLE vendedor (
- codigo_vendedor INT not null,
- nome_vendedor VARCHAR (20) not null,
- salario_fixo DECIMAL (10,2) not null,
- faixa_comissao CHAR (1) not null,
- SEXO CHAR (1) not null
- );
- CREATE TABLE produto (
- codigo_produto INT not null,
- unidade CHAR (3) not null,
- descricao_produto VARCHAR (30) not null,
- valor_unitario DECIMAL (10,2) not null
- );
- CREATE TABLE item_do_pedido (
- num_pedido INT not null,
- codigo_produto INT (11) not null,
- quantidade INT(11) not null,
- valor_item DECIMAL (10,2) not null
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement