Comandos sql
CONSTRAINT CLIENTE_PRIMARY_KEY PRIMARY KEY (CPF));
insert into cliente values (236723,'Joao da Silva','Candelaria','Natal'); insert into cliente values (334533,'Jose Gomes','Potilandia','Natal'); insert into cliente values (234123,'Pedro Andre','Alecrim','Natal'); insert into cliente values (456453,'Maria Luiza','Boa Viagem','Recife'); insert into cliente values (445643,'Rose Galvao','Centro','Caico'); insert into cliente values (108382,'Jose Alves','Centro','Natal'); insert into cliente values (324230,'Maria Silva','Lagoa Nova','Natal'); insert into cliente values (989238,'Joao Pedro','Jardins','Maceio'); insert into cliente values (463458,'Roberto Lins','Guararapes','Recide'); insert into cliente values (917526,'Josefa Silva','Centro','Maceio'); insert into cliente values (834020,'Lucia Alves','Ribeirao','Maceio'); insert into cliente values (927531,'Luiz Gomes','Alecrim','Natal'); insert into cliente values (568766,'Jose Alves','Jardins','Recide');
CREATE TABLE AGENCIA ( NUM_AG NUMBER (10), BAIRRO CHAR (15), CIDADE CHAR (15),
CONSTRAINT AGENCIA_PRIMARY_KEY PRIMARY KEY (NUM_AG));
insert into agencia values (123,'Centro','Natal'); insert into agencia values (345,'Alecrim','Natal'); insert into agencia values (678,'Boa Viagem','Recife'); insert into agencia values (687,'Jardins','Recife'); insert into agencia values (901,'Centro','Caico'); insert into agencia values (823,'Centro','Maceio'); insert into agencia values (110,'Lagoa Nova','Natal');
CREATE TABLE CONTA
(
NUM_AG NUMBER (10),
NUM_CONTA NUMBER (10) ,
DATA DATE,
CONSTRAINT CONTA_PRIMARY_KEY PRIMARY KEY (num_ag,num_conta),
CONSTRAINT CONTA_Agencia_FOREIGN_KEY FOREIGN KEY (num_ag) REFERENCES agencia (NUM_AG));
insert into conta values (123,242542,sysdate); insert into conta values (345,543919,sysdate); insert into conta values (678,346293,sysdate);