DB2 Com SQL
Trabalho Escolar: DB2 Com SQL. Pesquise 862.000+ trabalhos acadêmicosPor: Usepulvedo • 27/7/2014 • 3.517 Palavras (15 Páginas) • 325 Visualizações
Pós-Graduação em Desenvolvimento de Sistemas para Mainframe
BANCO DE DADOS E SQL COM DB2
Projeto do módulo IV
1 – Faça a criação das três tabelas, escolhendo os tipos dos atributos.
Tabela Cliente
********************************* Top of Data **********************************
---------+---------+---------+---------+---------+---------+---------+---------+
CREATE TABLE CLIENTE 00000100
(ID_CLIENTE CHAR(5) NOT NULL PRIMARY KEY, 00000110
NOME VARCHAR(35) NOT NULL, 00000120
END VARCHAR(30), 00000130
TEL CHAR(8), 00000140
CPF CHAR(11)) 00000150
00000200
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE617I COMMIT PERFORMED, SQLCODE IS 0
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE601I SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72
DSNE620I NUMBER OF SQL STATEMENTS PROCESSED IS 1
DSNE621I NUMBER OF INPUT RECORDS READ IS 7
DSNE622I NUMBER OF OUTPUT RECORDS WRITTEN IS 18
******************************** Bottom of Data ********************************
********************************* Top of Data **********************************
---------+---------+---------+---------+---------+---------+---------+---------+
CREATE UNIQUE INDEX XID_CLIENTE 00000100
ON CLIENTE 00000110
(ID_CLIENTE ASC) 00000120
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE617I COMMIT PERFORMED, SQLCODE IS 0
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE601I SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72
DSNE620I NUMBER OF SQL STATEMENTS PROCESSED IS 1
DSNE621I NUMBER OF INPUT RECORDS READ IS 3
DSNE622I NUMBER OF OUTPUT RECORDS WRITTEN IS 13
******************************** Bottom of Data ********************************
Tabela Peca
********************************* Top of Data **********************************
---------+---------+---------+---------+---------+---------+---------+---------+
CREATE TABLE PECA 00000100
(ID_PECA CHAR(5) NOT NULL PRIMARY KEY, 00000110
MARCA VARCHAR(10) NOT NULL, 00000120
DISPON VARCHAR(3) NOT NULL, 00000130
PRECO VARCHAR(5) NOT NULL, 00000140
NOME VARCHAR(10) NOT NULL); 00000150
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---------+---------+
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE617I COMMIT PERFORMED, SQLCODE IS 0
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0
---------+---------+---------+---------+---------+---------+---------+---------+
DSNE601I SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72
DSNE620I NUMBER OF SQL STATEMENTS PROCESSED IS 1
DSNE621I NUMBER OF INPUT RECORDS READ IS 6
DSNE622I NUMBER OF OUTPUT RECORDS WRITTEN IS 18
******************************** Bottom of Data ********************************
********************************* Top of Data **********************************
---------+---------+---------+---------+---------+---------+---------+---------+
CREATE UNIQUE INDEX XID_PECA 00000100
ON PECA (ID_PECA ASC) 00000110
---------+---------+---------+---------+---------+---------+---------+---------+
...