mysql> insert into Album values (Slippery When Wet, PolyGram, 1986, 44:03, CD) -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'When Wet, PolyGram, 1986, 44:03, CD)' at line 1 mysql> insert into Album (TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato) values (Slippery When Wet, PolyGram, 1986, 44:03, CD) -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'When Wet, PolyGram, 1986, 44:03, CD)' at line 1 mysql> insert into Album (TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato) values (SlipperyWhenWet, PolyGram, 1986, 44:03, CD) -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':03, CD)' at line 1 mysql> alter table Album modify TitoloAlbum text (60) -> ; Query OK, 0 rows affected (1.04 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> insert into Album (TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato) values (SlipperyWhenWet, PolyGram, 1986, 44:03, CD) -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':03, CD)' at line 1 mysql> insert into Album (TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato) values (Slippery When Wet, PolyGram, 1986, 00:44:03, CD) -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'When Wet, PolyGram, 1986, 00:44:03, CD)' at line 1 mysql> alter table Album modify TitoloAlbum char (60) -> ; Query OK, 0 rows affected (0.18 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> insert into Album (TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato) values (Slippery When Wet, PolyGram, 1986, 00:44:03, CD) -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'When Wet, PolyGram, 1986, 00:44:03, CD)' at line 1 mysql> alter table Album modify TitoloAlbum tinytext (60) -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(60)' at line 1 mysql> alter table Album modify TitoloAlbum tinytext; Query OK, 0 rows affected (1.44 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato) values (NULL, Slippery When Wet, PolyGram, 1986, 00:44:03, CD) -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'When Wet, PolyGram, 1986, 00:44:03, CD)' at line 1 mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato) values ('NULL', 'Slippery When Wet', 'PolyGram', '1986', '00:44:03', 'CD'); Query OK, 1 row affected, 1 warning (0.69 sec) mysql> show Album -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Album' at line 1 mysql> show tables -> ; +------------------+ | Tables_in_biblio | +------------------+ | Album | | ArtistaA | | ArtistaB | | Brano | | Genere | | GenereA | | Gruppo | | LineUp | | Lingua | | LinguaA | | LinguaB | | Locazione | | Musicista | | Ruolo | | RuoloGA | | RuoloGB | | RuoloMA | | RuoloMB | | SolistaA | | SolistaB | | Tracklist | +------------------+ 21 rows in set (0.19 sec) mysql> examine Album -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'examine Album' at line 1 mysql> help content; Nothing found Please try to run 'help contents' for a list of all accessible topics mysql> help contents; You asked for help about help category: "Contents" For more information, type 'help ', where is one of the following categories: Account Management Administration Data Definition Data Manipulation Data Types Functions Functions and Modifiers for Use with GROUP BY Geographic Features Language Structure Storage Engines Stored Routines Table Maintenance Transactions Triggers mysql> help Data Manipulation You asked for help about help category: "Data Manipulation" For more information, type 'help ', where is one of the following topics: CACHE INDEX CHANGE MASTER TO DEALLOCATE PREPARE DELETE DO DUAL EXECUTE STATEMENT EXPLAIN FLUSH HANDLER INSERT INSERT DELAYED INSERT SELECT JOIN KILL LOAD DATA LOAD DATA FROM MASTER LOAD INDEX LOAD TABLE FROM MASTER PREPARE PURGE MASTER LOGS REPLACE INTO RESET RESET MASTER RESET SLAVE SELECT SET SET GLOBAL SQL_SLAVE_SKIP_COUNTER SET SQL_LOG_BIN SHOW SHOW BINARY LOGS SHOW BINLOG EVENTS SHOW CHARACTER SET SHOW COLLATION SHOW COLUMNS SHOW CREATE DATABASE SHOW CREATE PROCEDURE SHOW CREATE TABLE SHOW CREATE VIEW SHOW DATABASES SHOW ENGINE SHOW ENGINES SHOW ERRORS SHOW GRANTS SHOW INDEX SHOW INNODB STATUS SHOW LOGS SHOW MASTER STATUS SHOW MUTEX STATUS SHOW OPEN TABLES SHOW PRIVILEGES SHOW PROCEDURE CODE SHOW PROCEDURE STATUS SHOW PROCESSLIST SHOW PROFILES SHOW SLAVE HOSTS SHOW SLAVE STATUS SHOW STATUS SHOW TABLE STATUS SHOW TABLES SHOW TRIGGERS SHOW VARIABLES SHOW WARNINGS START SLAVE STOP SLAVE TRUNCATE TABLE UNION UPDATE mysql> select * from Album; +---------+-------------------+-----------+-----------+-----------+---------+--------+ | IDAlbum | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | Formato | Codice | +---------+-------------------+-----------+-----------+-----------+---------+--------+ | 1 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | NULL | +---------+-------------------+-----------+-----------+-----------+---------+--------+ 1 row in set (0.10 sec) mysql> insert into Locazione (Codice) values ('NULL');Query OK, 1 row affected, 1 warning (0.05 sec) mysql> select * from Album -> ; +---------+-------------------+-----------+-----------+-----------+---------+--------+ | IDAlbum | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | Formato | Codice | +---------+-------------------+-----------+-----------+-----------+---------+--------+ | 1 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | NULL | +---------+-------------------+-----------+-----------+-----------+---------+--------+ 1 row in set (0.00 sec) mysql> select * from Locazione; +--------+ | Codice | +--------+ | 1 | +--------+ 1 row in set (0.01 sec) mysql> insert into Album (Codice) values ('NULL');ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`biblio/Album`, CONSTRAINT `Album_ibfk_1` FOREIGN KEY (`Codice`) REFERENCES `Locazione` (`Codice`) ON UPDATE CASCADE) mysql> insert into Album (Codice) values ('1'); Query OK, 1 row affected (0.09 sec) mysql> select * from Locazione -> ; +--------+ | Codice | +--------+ | 1 | +--------+ 1 row in set (0.00 sec) mysql> select * from Album; +---------+-------------------+-----------+-----------+-----------+---------+--------+ | IDAlbum | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | Formato | Codice | +---------+-------------------+-----------+-----------+-----------+---------+--------+ | 1 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | NULL | | 2 | NULL | NULL | NULL | NULL | NULL | 1 | +---------+-------------------+-----------+-----------+-----------+---------+--------+ 2 rows in set (0.00 sec) mysql> select TitoloAlbum from Album where Codice = 1 -> ; +-------------+ | TitoloAlbum | +-------------+ | NULL | +-------------+ 1 row in set (0.15 sec) mysql> select Codice from Album where titoloalbum = 'Slippery When Wet' -> ; +--------+ | Codice | +--------+ | NULL | +--------+ 1 row in set (0.00 sec) mysql> help contents; You asked for help about help category: "Contents" For more information, type 'help ', where is one of the following categories: Account Management Administration Data Definition Data Manipulation Data Types Functions Functions and Modifiers for Use with GROUP BY Geographic Features Language Structure Storage Engines Stored Routines Table Maintenance Transactions Triggers mysql> help Data Manipulation You asked for help about help category: "Data Manipulation" For more information, type 'help ', where is one of the following topics: CACHE INDEX CHANGE MASTER TO DEALLOCATE PREPARE DELETE DO DUAL EXECUTE STATEMENT EXPLAIN FLUSH HANDLER INSERT INSERT DELAYED INSERT SELECT JOIN KILL LOAD DATA LOAD DATA FROM MASTER LOAD INDEX LOAD TABLE FROM MASTER PREPARE PURGE MASTER LOGS REPLACE INTO RESET RESET MASTER RESET SLAVE SELECT SET SET GLOBAL SQL_SLAVE_SKIP_COUNTER SET SQL_LOG_BIN SHOW SHOW BINARY LOGS SHOW BINLOG EVENTS SHOW CHARACTER SET SHOW COLLATION SHOW COLUMNS SHOW CREATE DATABASE SHOW CREATE PROCEDURE SHOW CREATE TABLE SHOW CREATE VIEW SHOW DATABASES SHOW ENGINE SHOW ENGINES SHOW ERRORS SHOW GRANTS SHOW INDEX SHOW INNODB STATUS SHOW LOGS SHOW MASTER STATUS SHOW MUTEX STATUS SHOW OPEN TABLES SHOW PRIVILEGES SHOW PROCEDURE CODE SHOW PROCEDURE STATUS SHOW PROCESSLIST SHOW PROFILES SHOW SLAVE HOSTS SHOW SLAVE STATUS SHOW STATUS SHOW TABLE STATUS SHOW TABLES SHOW TRIGGERS SHOW VARIABLES SHOW WARNINGS START SLAVE STOP SLAVE TRUNCATE TABLE UNION UPDATE mysql> help update; Name: 'UPDATE' Description: Syntax: Single-table syntax: UPDATE [LOW_PRIORITY] [IGNORE] tbl_name SET col_name1=expr1 [, col_name2=expr2 ...] [WHERE where_condition] [ORDER BY ...] [LIMIT row_count] Multiple-table syntax: UPDATE [LOW_PRIORITY] [IGNORE] table_references SET col_name1=expr1 [, col_name2=expr2 ...] [WHERE where_condition] For the single-table syntax, the UPDATE statement updates columns of existing rows in tbl_name with new values. The SET clause indicates which columns to modify and the values they should be given. The WHERE clause, if given, specifies the conditions that identify which rows to update. With no WHERE clause, all rows are updated. If the ORDER BY clause is specified, the rows are updated in the order that is specified. The LIMIT clause places a limit on the number of rows that can be updated. For the multiple-table syntax, UPDATE updates rows in each table named in table_references that satisfy the conditions. In this case, ORDER BY and LIMIT cannot be used. where_condition is an expression that evaluates to true for each row to be updated. It is specified as described in [HELP SELECT]. The UPDATE statement supports the following modifiers: o If you use the LOW_PRIORITY keyword, execution of the UPDATE is delayed until no other clients are reading from the table. o If you use the IGNORE keyword, the update statement does not abort even if errors occur during the update. Rows for which duplicate-key conflicts occur are not updated. Rows for which columns are updated to values that would cause data conversion errors are updated to the closest valid values instead. URL: http://dev.mysql.com/doc/refman/5.0/en/update.html mysql> update Album; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 mysql> update Album set Codice = 'NULL'; ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`biblio/Album`, CONSTRAINT `Album_ibfk_1` FOREIGN KEY (`Codice`) REFERENCES `Locazione` (`Codice`) ON UPDATE CASCADE) mysql> begin -> insert into Codice ('NULL'); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert into Codice ('NULL')' at line 2 mysql> insert into Codice ('NULL'); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''NULL')' at line 1 mysql> begin insert into Locazione (Codice) values ('NULL'); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert into Locazione (Codice) values ('NULL')' at line 1 mysql> insert into Locazione (Codice) values ('NULL'); Query OK, 1 row affected, 1 warning (0.10 sec) mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato, Codice) values ('NULL', 'Slippery When Wet' PolyGram, 1986, '00:44:03', CD, 2); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PolyGram, 1986, '00:44:03', CD, 2)' at line 1 mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato, Codice) values ('NULL', 'Slippery When Wet', PolyGram, 1986, '00:44:03', CD, 2); ERROR 1054 (42S22): Unknown column 'PolyGram' in 'field list' mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato, Codice) values ('NULL', 'Slippery When Wet', 'PolyGram', '1986', '00:44:03', CD, 2); ERROR 1054 (42S22): Unknown column 'CD' in 'field list' mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato, Codice) values ('NULL', 'Slippery When Wet', 'PolyGram', '1986', '00:44:03', 'CD', '2'); Query OK, 1 row affected, 1 warning (0.09 sec) mysql> select * from Album; +---------+-------------------+-----------+-----------+-----------+---------+--------+ | IDAlbum | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | Formato | Codice | +---------+-------------------+-----------+-----------+-----------+---------+--------+ | 1 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | NULL | | 2 | NULL | NULL | NULL | NULL | NULL | 1 | | 3 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | 2 | +---------+-------------------+-----------+-----------+-----------+---------+--------+ 3 rows in set (0.00 sec) mysql> select * Locazione; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Locazione' at line 1 mysql> select * from Locazione; +--------+ | Codice | +--------+ | 1 | | 2 | +--------+ 2 rows in set (0.00 sec) mysql> BEGIN; Query OK, 0 rows affected (0.01 sec) mysql> insert into Locazione (Codice) values ('NULL'); Query OK, 1 row affected, 1 warning (0.01 sec) mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato, Codice) values ('NULL', 'Slippery When Wet' PolyGram, 1986, '00:44:03', CD, 'NULL'); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PolyGram, 1986, '00:44:03', CD, 'NULL')' at line 1 mysql> insert into Gruppo (NomeGruppo) values ('Bon Jovi'); Query OK, 1 row affected (0.08 sec) mysql> insert into ArtistaA (IDAlbum, NomeGruppo) values ('NULL', 'NULL'); ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`biblio/ArtistaA`, CONSTRAINT `ArtistaA_ibfk_1` FOREIGN KEY (`IDAlbum`) REFERENCES `Album` (`IDAlbum`) ON UPDATE CASCADE) mysql> BEGIN; Query OK, 0 rows affected (0.11 sec) mysql> insert into Locazione (Codice) values ('NULL'); Query OK, 1 row affected, 1 warning (0.00 sec) mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato, Codice) values ('NULL', 'Slippery When Wet', PolyGram, 1986, '00:44:03', CD, 'NULL'); ERROR 1054 (42S22): Unknown column 'PolyGram' in 'field list' mysql> insert into Gruppo (NomeGruppo) values ('Bon Jovi'); ERROR 1062 (23000): Duplicate entry 'Bon Jovi' for key 1 mysql> insert into ArtistaA (IDAlbum, NomeGruppo) values ('NULL', 'NULL'); ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`biblio/ArtistaA`, CONSTRAINT `ArtistaA_ibfk_1` FOREIGN KEY (`IDAlbum`) REFERENCES `Album` (`IDAlbum`) ON UPDATE CASCADE) mysql> COMMIT; Query OK, 0 rows affected (0.06 sec) mysql> BEGIN; Query OK, 0 rows affected (0.00 sec) mysql> insert into Locazione (Codice) values ('NULL'); Query OK, 1 row affected, 1 warning (0.00 sec) mysql> insert into Album (IDAlbum, TitoloAlbum, Etichetta, AnnoAlbum, DurataTot, Formato, Codice) values ('NULL', 'Slippery When Wet', 'PolyGram', '1986', '00:44:03', 'CD', 'NULL'); ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`biblio/Album`, CONSTRAINT `Album_ibfk_1` FOREIGN KEY (`Codice`) REFERENCES `Locazione` (`Codice`) ON UPDATE CASCADE) mysql> insert into Gruppo (NomeGruppo) values ('Bon Jovi'); ERROR 1062 (23000): Duplicate entry 'Bon Jovi' for key 1 mysql> insert into ArtistaA (IDAlbum, NomeGruppo) values ('NULL', 'NULL'); ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`biblio/ArtistaA`, CONSTRAINT `ArtistaA_ibfk_1` FOREIGN KEY (`IDAlbum`) REFERENCES `Album` (`IDAlbum`) ON UPDATE CASCADE) mysql> select * from Album; +---------+-------------------+-----------+-----------+-----------+---------+--------+ | IDAlbum | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | Formato | Codice | +---------+-------------------+-----------+-----------+-----------+---------+--------+ | 1 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | NULL | | 2 | NULL | NULL | NULL | NULL | NULL | 1 | | 3 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | 2 | +---------+-------------------+-----------+-----------+-----------+---------+--------+ 3 rows in set (0.01 sec) mysql> select * from Album where Formato = cD -> ; ERROR 1054 (42S22): Unknown column 'cD' in 'where clause' mysql> select * from Album where Formato = CD; ERROR 1054 (42S22): Unknown column 'CD' in 'where clause' mysql> select * from Album where TitoloAlbum = 'Slippery When Wet' -> ; +---------+-------------------+-----------+-----------+-----------+---------+--------+ | IDAlbum | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | Formato | Codice | +---------+-------------------+-----------+-----------+-----------+---------+--------+ | 1 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | NULL | | 3 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | 2 | +---------+-------------------+-----------+-----------+-----------+---------+--------+ 2 rows in set (0.00 sec) mysql> select * from Album where Formato = 'CD'; +---------+-------------------+-----------+-----------+-----------+---------+--------+ | IDAlbum | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | Formato | Codice | +---------+-------------------+-----------+-----------+-----------+---------+--------+ | 1 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | NULL | | 3 | Slippery When Wet | PolyGram | 1986 | 00:44:03 | CD | 2 | +---------+-------------------+-----------+-----------+-----------+---------+--------+ 2 rows in set (0.00 sec) mysql> dpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokdpokpokpokpokdpokpokpokpokpokpokpokpodkpokdpokdpokpokdpokpokdpokpokdpokpokpokdpokdpokpokdpokpokdpokpokdpokpokdpokpokd -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'dpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokpokp' at line 1 mysql> drop table Album; ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails mysql> drop table Locazione; ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails mysql> select * from ArtistaA; Empty set (0.00 sec) mysql> insert into ArtistaA (IDAlbum, NomeGruppo) values ('3', 'Bon Jovi'); Query OK, 1 row affected (0.24 sec) mysql> insert into ArtistaA (IDAlbum, NomeGruppo) values ('1', 'Bon Jovi'); Query OK, 1 row affected (0.09 sec) mysql> select * from Album where (select IDAlbum from ArtistaA where NomeGruppo = 'Bon Jovi'); ERROR 1242 (21000): Subquery returns more than 1 row mysql> (select IDAlbum from ArtistaA where NomeGruppo = 'Bon Jovi'); +---------+ | IDAlbum | +---------+ | 1 | | 3 | +---------+ 2 rows in set (0.00 sec) mysql> select * from Gruppo; +------------+ | NomeGruppo | +------------+ | Bon Jovi | +------------+ 1 row in set (0.00 sec) mysql> select * from Album where IDAlbum = (select IDAlbum from ArtistaA where NomeGruppo = 'Bon Jovi'); ERROR 1242 (21000): Subquery returns more than 1 row mysql> select Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot Gruppo.NomeGruppo from Album, Gruppo where Album.IDAlbum = ArtistaA.IDAlbum -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.NomeGruppo from Album, Gruppo where Album.IDAlbum = ArtistaA.IDAlbum' at line 1 mysql> select Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot, Gruppo.NomeGruppo from Album, Gruppo where Album.IDAlbum = ArtistaA.IDAlbum -> ; ERROR 1054 (42S22): Unknown column 'ArtistaA.IDAlbum' in 'where clause' mysql> select Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot, Gruppo.NomeGruppo from Album, Gruppo, ArtistaA where Album.IDAlbum = ArtistaA.IDAlbum -> ; +-------------------+-----------+-----------+-----------+------------+ | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | NomeGruppo | +-------------------+-----------+-----------+-----------+------------+ | Slippery When Wet | PolyGram | 1986 | 00:44:03 | Bon Jovi | | Slippery When Wet | PolyGram | 1986 | 00:44:03 | Bon Jovi | +-------------------+-----------+-----------+-----------+------------+ 2 rows in set (0.02 sec) mysql> select Gruppo.NomeGruppo, Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot from Album, Gruppo, ArtistaA where Album.IDAlbum = ArtistaA.IDAlbum -> ; +------------+-------------------+-----------+-----------+-----------+ | NomeGruppo | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | +------------+-------------------+-----------+-----------+-----------+ | Bon Jovi | Slippery When Wet | PolyGram | 1986 | 00:44:03 | | Bon Jovi | Slippery When Wet | PolyGram | 1986 | 00:44:03 | +------------+-------------------+-----------+-----------+-----------+ 2 rows in set (0.00 sec) mysql> insert into Genere (NomeGenere) values ('ROCK'); Query OK, 1 row affected (0.26 sec) mysql> select * Genere; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Genere' at line 1 mysql> select * from Genere; +------------+ | NomeGenere | +------------+ | ROCK | +------------+ 1 row in set (0.01 sec) mysql> insert into Genere (NomeGenere) values ('Rock'); ERROR 1062 (23000): Duplicate entry 'Rock' for key 1 mysql> insert into GenereA (IDAlbum, NomeGenere) values ('3', 'Rock'); Query OK, 1 row affected (0.07 sec) mysql> select Gruppo.NomeGruppo, Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot from Gruppo, Album, GenereA where Genere.NomeGenere = 'Rock'; ERROR 1054 (42S22): Unknown column 'Genere.NomeGenere' in 'where clause' mysql> select Gruppo.NomeGruppo, Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot from Gruppo, Album, GenereA where Album.IDAlbum = Genere.IDAlbum and Genere.NomeGenere = 'Rock'; ERROR 1054 (42S22): Unknown column 'Genere.IDAlbum' in 'where clause' mysql> select Gruppo.NomeGruppo, Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot from Gruppo, Album, GenereA where Album.IDAlbum = GenereA.IDAlbum and Genere.NomeGenere = 'Rock'; ERROR 1054 (42S22): Unknown column 'Genere.NomeGenere' in 'where clause' mysql> select Gruppo.NomeGruppo, Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot from Gruppo, Album, GenereA where Album.IDAlbum = GenereA.IDAlbum and GenereA.NomeGenere = 'Rock'; +------------+-------------------+-----------+-----------+-----------+ | NomeGruppo | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | +------------+-------------------+-----------+-----------+-----------+ | Bon Jovi | Slippery When Wet | PolyGram | 1986 | 00:44:03 | +------------+-------------------+-----------+-----------+-----------+ 1 row in set (0.00 sec) mysql> select Gruppo.NomeGruppo, Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot from Gruppo, Album, GenereA where Album.IDAlbum = GenereA.IDAlbum and GenereA.NomeGenere = 'Rock';+------------+-------------------+-----------+-----------+-----------+ | NomeGruppo | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | +------------+-------------------+-----------+-----------+-----------+ | Bon Jovi | Slippery When Wet | PolyGram | 1986 | 00:44:03 | +------------+-------------------+-----------+-----------+-----------+ 1 row in set (0.00 sec) mysql> insert into Lingua (NomeLingua) values ('Inglese'); Query OK, 1 row affected (0.11 sec) mysql> select * from Lingua where NomeLingua = Inglese; ERROR 1054 (42S22): Unknown column 'Inglese' in 'where clause' mysql> select * from Lingua where NomeLingua = 'Inglese'; +------------+ | NomeLingua | +------------+ | Inglese | +------------+ 1 row in set (0.10 sec) mysql> insert into LinguaA (IDAlbum, NomeLingua) values ('3', 'Inglese'); Query OK, 1 row affected (0.05 sec) mysql> select Gruppo.NomeGruppo, Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot, GenereA.NomeGenere, LinguaA.NomeLingua from Gruppo, Album, GenereA, LinguaA;+------------+-------------------+-----------+-----------+-----------+------------+------------+ | NomeGruppo | TitoloAlbum | Etichetta | AnnoAlbum | DurataTot | NomeGenere | NomeLingua | +------------+-------------------+-----------+-----------+-----------+------------+------------+ | Bon Jovi | Slippery When Wet | PolyGram | 1986 | 00:44:03 | Rock | Inglese | | Bon Jovi | NULL | NULL | NULL | NULL | Rock | Inglese | | Bon Jovi | Slippery When Wet | PolyGram | 1986 | 00:44:03 | Rock | Inglese | +------------+-------------------+-----------+-----------+-----------+------------+------------+ 3 rows in set (0.00 sec) mysql> select Gruppo.NomeGruppo, Album.TitoloAlbum, Album.Etichetta, Album.AnnoAlbum, Album.DurataTot, GenereA.NomeGenere, LinguaA.NomeLingua from Gruppo, Album; ERROR 1054 (42S22): Unknown column 'GenereA.NomeGenere' in 'field list' mysql> select * from Lingua;+------------+ | NomeLingua | +------------+ | Inglese | +------------+ 1 row in set (0.00 sec) mysql> select * from LinguaA; +---------+------------+ | IDAlbum | NomeLingua | +---------+------------+ | 3 | Inglese | +---------+------------+ 1 row in set (0.00 sec) mysql> insert into Brano (IDBrano, Titolo, Durata, Anno, NomeGenere) values ('NULL', 'Let It Rock', '5:24', '1986', 'Rock'); Query OK, 1 row affected, 1 warning (0.14 sec) mysql> select * from Brano; +---------+-------------+----------+------+------------+ | IDBrano | Titolo | Durata | Anno | NomeGenere | +---------+-------------+----------+------+------------+ | 1 | Let It Rock | 05:24:00 | 1986 | Rock | +---------+-------------+----------+------+------------+ 1 row in set (0.00 sec) mysql> insert into Brano (IDBrano, Titolo, Durata, Anno, NomeGenere) values ('NULL', 'You Give Love A Bad Name', '3:44', '1986', 'Rock'); Query OK, 1 row affected, 1 warning (0.01 sec) mysql> insert into TrackList (IDAlbum, IDBrano) values ('3', '1, 2'); ERROR 1146 (42S02): Table 'biblio.TrackList' doesn't exist mysql> insert into Tracklist (IDAlbum, IDBrano) values ('3', '1, 2'); Query OK, 1 row affected, 1 warning (0.10 sec) mysql> select * from Tracklist; +---------+---------+ | IDAlbum | IDBrano | +---------+---------+ | 3 | 1 | +---------+---------+ 1 row in set (0.00 sec) mysql> insert into Tracklist (IDAlbum, IDBrano) values ('3', '2'); Query OK, 1 row affected (0.08 sec) mysql> select * from Tracklist; +---------+---------+ | IDAlbum | IDBrano | +---------+---------+ | 3 | 1 | | 3 | 2 | +---------+---------+ 2 rows in set (0.00 sec) mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where Tracklist.IDAlbum = '3' -> ; +--------------------------+------------+-------------------+ | Titolo | NomeGruppo | TitoloAlbum | +--------------------------+------------+-------------------+ | Let It Rock | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | NULL | | Let It Rock | Bon Jovi | NULL | | You Give Love A Bad Name | Bon Jovi | NULL | | You Give Love A Bad Name | Bon Jovi | NULL | | Let It Rock | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | +--------------------------+------------+-------------------+ 12 rows in set (0.02 sec) mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where Album.IDAlbum = Tracklist.IDAlbum = '3' -> ; Empty set (0.08 sec) mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where Album.IDAlbum = 3, Tracklist.IDAlbum = '3' -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' Tracklist.IDAlbum = '3'' at line 1 mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where Album.IDAlbum = 3 and Tracklist.IDAlbum = '3' -> ; +--------------------------+------------+-------------------+ | Titolo | NomeGruppo | TitoloAlbum | +--------------------------+------------+-------------------+ | Let It Rock | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | +--------------------------+------------+-------------------+ 4 rows in set (0.00 sec) mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where Album.IDAlbum = '3' and Tracklist.IDAlbum = '3'; +--------------------------+------------+-------------------+ | Titolo | NomeGruppo | TitoloAlbum | +--------------------------+------------+-------------------+ | Let It Rock | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | +--------------------------+------------+-------------------+ 4 rows in set (0.00 sec) mysql> select * from Brano; +---------+--------------------------+----------+------+------------+ | IDBrano | Titolo | Durata | Anno | NomeGenere | +---------+--------------------------+----------+------+------------+ | 1 | Let It Rock | 05:24:00 | 1986 | Rock | | 2 | You Give Love A Bad Name | 03:44:00 | 1986 | Rock | +---------+--------------------------+----------+------+------------+ 2 rows in set (0.00 sec) mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where (select Tracklist.IDAlbum = '3'); +--------------------------+------------+-------------------+ | Titolo | NomeGruppo | TitoloAlbum | +--------------------------+------------+-------------------+ | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | NULL | | You Give Love A Bad Name | Bon Jovi | NULL | | Let It Rock | Bon Jovi | NULL | | You Give Love A Bad Name | Bon Jovi | NULL | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | +--------------------------+------------+-------------------+ 12 rows in set (0.01 sec) mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where (select Tracklist.IDAlbum = '3') and (select Album.IDAlbum = '3'); +--------------------------+------------+-------------------+ | Titolo | NomeGruppo | TitoloAlbum | +--------------------------+------------+-------------------+ | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | +--------------------------+------------+-------------------+ 4 rows in set (0.01 sec) mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where Tracklist.IDAlbum = Album.IDAlbum and Album.IDAlbum = '3'; +--------------------------+------------+-------------------+ | Titolo | NomeGruppo | TitoloAlbum | +--------------------------+------------+-------------------+ | Let It Rock | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | +--------------------------+------------+-------------------+ 4 rows in set (0.00 sec) mysql> select Brano.Titolo, Album.TitoloAlbum from Brano, Album, Tracklist where Tracklist.IDAlbum = Album.IDAlbum and Album.IDAlbum = '3'; +--------------------------+-------------------+ | Titolo | TitoloAlbum | +--------------------------+-------------------+ | Let It Rock | Slippery When Wet | | Let It Rock | Slippery When Wet | | You Give Love A Bad Name | Slippery When Wet | | You Give Love A Bad Name | Slippery When Wet | +--------------------------+-------------------+ 4 rows in set (0.00 sec) mysql> select Brano.Titolo, Gruppo.NomeGruppo, Album.TitoloAlbum from Brano, Gruppo, Album, Tracklist where Tracklist.IDAlbum = '3'; +--------------------------+------------+-------------------+ | Titolo | NomeGruppo | TitoloAlbum | +--------------------------+------------+-------------------+ | Let It Rock | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | NULL | | Let It Rock | Bon Jovi | NULL | | You Give Love A Bad Name | Bon Jovi | NULL | | You Give Love A Bad Name | Bon Jovi | NULL | | Let It Rock | Bon Jovi | Slippery When Wet | | Let It Rock | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | | You Give Love A Bad Name | Bon Jovi | Slippery When Wet | +--------------------------+------------+-------------------+ 12 rows in set (0.00 sec)