Cadernos de Questões

Provas Favoritas

Filtros Salvos

Foram encontradas 55 questões.
#2616409

Em um banco de dados aberto e em condições ideais há uma tabela chamada Contribuinte cuja chave primária é idContribuinte. Há também uma tabela chamada Imposto cuja chave primária é idimposto. Para criar uma tabela de associação chamada Contribuinte_imposto cuja chave primária é composta pelos campos idContribuinte e idImposto, que são chaves estrangeiras resultantes da relação dessa tabela com as tabelas Contribuinte e Imposto, utiliza-se a instrução SQL

  • CREATE TABLE Contribuinte_Imposto(idContribuinte INT, idImposto INT, PRIMARY KEY (idContribuinte), FOREIGN KEY (idContribuinte) REFERENCES Contribuinte (idContribuinte), PRIMARY KEY (idImposto), FOREIGN KEY (idContribuinte) REFERENCES Contribuinte (idContribuinte));
  • CREATE TABLE Contribuinte_Imposto(idContribuinte INT NOT NULL, idImposto INT NOT NULL, PRIMARY KEY (idContribuinte, idImposto), CONSTRAINT fk1 FOREIGN KEY (idContribuinte) REFERENCES Contribuinte (idContribuinte), CONSTRAINT fk2 FOREIGN KEY (idImposto) REFERENCES Imposto (idImposto));
  • CREATE TABLE Contribuinte_Imposto(idContribuinte INT NOT NULL, idImposto INT NOT NULL, PRIMARY KEY (idContribuinte, idImposto), FOREIGN KEY (idContribuinte) SOURCE Contribuinte (idContribuinte), FOREIGN KEY (idImposto) SOURCE Imposto (idImposto));
  • CREATE TABLE Contribuinte_Imposto(idContribuinte INT NOT NULL, idImposto INT NOT NULL, PRIMARY KEY (idContribuinte, idImposto), FOREIGN KEY (idContribuinte, idImposto) REFERENCES (Contribuinte!idContribuinte, Imposto!idImposto));
  • CREATE TABLE Contribuinte_Imposto(idContribuinte INT NOT NULL, idImposto INT NOT NULL, PRIMARY KEY (idContribuinte, idImposto), FOREIGN KEY (idContribuinte, idImposto) REFERENCES all parents);
Fale com IAgo
IAgo - Assistente IAProva
IA
Olá! Sou o IAgo, seu assistente aqui no IAProvatec 😊
Veja como posso te ajudar:
Agora