fork download
  1. CREATE TABLE Artista(
  2. Codice INT PRIMARY KEY,
  3. Nome VARCHAR(20),
  4. Cognome VARCHAR(20),
  5. Eta VARCHAR(20)
  6. );
  7.  
  8.  
  9. CREATE TABLE Opera(
  10. Codice INT PRIMARY KEY,
  11. Titolo VARCHAR(20),
  12. Valore DECIMAL,
  13. CodArtista INT,
  14. FOREIGN KEY (CodArtista) REFERENCES Artista(Codice)
  15. );
  16.  
  17. INSERT INTO Artista VALUES(1,'Gianluca','Palmieri',34);
  18. INSERT INTO Artista VALUES(2,'Mario','Rossi',30);
  19. INSERT INTO Artista VALUES(3,'Michele','Verdi',34);
  20. INSERT INTO Artista VALUES(4,'Giuseppe','Rossi',33);
  21. INSERT INTO Artista VALUES(5,'Matteo','Gialli',33);
  22. INSERT INTO Artista VALUES(6,'Vanessa','Gialli',32);
  23. INSERT INTO Artista VALUES(7,'Giuseppe','Verdi',31);
  24. INSERT INTO Artista VALUES(8,'Mario','Rossi',32);
  25.  
  26. INSERT INTO Opera VALUES(1,'cielo',200,1);
  27. INSERT INTO Opera VALUES(2,'mare',400,1);
  28. INSERT INTO Opera VALUES(3,'terra',100,2);
  29. INSERT INTO Opera VALUES(4,'Giuseppe',40,5);
  30.  
  31.  
Success #stdin #stdout 0.01s 5264KB
stdin
Standard input is empty
stdout
Standard output is empty