mysql> source C:\Users\01064-13\Desktop\libreria.sql; ERROR: Unknown command '\U'. ERROR: Unknown command '\0'. ERROR: Unknown command '\D'. ERROR: Unknown command '\l'. Query OK, 0 rows affected (0.27 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.53 sec) Query OK, 0 rows affected (0.14 sec) Query OK, 0 rows affected (0.19 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.63 sec) Database changed Query OK, 0 rows affected (0.31 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (4.41 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.08 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 9 rows affected (0.33 sec) Records: 9 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.17 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.69 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 6 rows affected (0.08 sec) Records: 6 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.84 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 3 rows affected (0.11 sec) Records: 3 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.17 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.81 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 7 rows affected (0.08 sec) Records: 7 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.80 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 8 rows affected (0.20 sec) Records: 8 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> use libreria; Database changed mysql> show tables; +--------------------+ | Tables_in_libreria | +--------------------+ | asignatura | | autor | | editorial | | liautedi | | libro | +--------------------+ 5 rows in set (0.34 sec) mysql> select * from libro; +---------+---------------------+-----------+--------+------------+ | IdLibro | Descripcion | Nropagina | Precio | Codmateria | +---------+---------------------+-----------+--------+------------+ | L01 | Calculo II | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructura de datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 10500 | M04 | | L05 | Admon en una p gina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramaci¢n | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+------------+ 8 rows in set (0.13 sec) mysql> select * from autor; +----------+----------------------+ | Codautor | Nombre | +----------+----------------------+ | A01 | Luis Joyanes | | A02 | Jorge Vasquez Posada | | A03 | Jhon Soars | | A04 | Riaz Khadem | | A05 | Robert Lorber | | A06 | Mario Dream | +----------+----------------------+ 6 rows in set (0.06 sec) mysql> select libro.idlibro,libro.descripcion,autor.codautor,autor.nombre from libro,liautedi,autor where libro.codlibro = liautedi and liautedi.codautor = autor.codautor and autor.nombre='Riaz Khadem'; ERROR 1054 (42S22): Unknown column 'libro.codlibro' in 'where clause' mysql> select libro.idlibro,libro.descripcion,autor.codautor,autor.nombre from libro,liautedi,autor where libro.idlibro = liautedi and liautedi.codautor = autor.codautor and autor.nombre='Riaz Khadem'; ERROR 1054 (42S22): Unknown column 'liautedi' in 'where clause' mysql> select * from autor; +----------+----------------------+ | Codautor | Nombre | +----------+----------------------+ | A01 | Luis Joyanes | | A02 | Jorge Vasquez Posada | | A03 | Jhon Soars | | A04 | Riaz Khadem | | A05 | Robert Lorber | | A06 | Mario Dream | +----------+----------------------+ 6 rows in set (0.00 sec) mysql> show tables; +--------------------+ | Tables_in_libreria | +--------------------+ | asignatura | | autor | | editorial | | liautedi | | libro | +--------------------+ 5 rows in set (0.00 sec) mysql> select libro.idlibro,libro.descripcion,autor.codautor,autor.nombre from libro,liautedi,autor where libro.codlibro = liautedi and liautedi.codautor = autor.codautor and autor.nombre='Riaz Khadem'; ERROR 1054 (42S22): Unknown column 'libro.codlibro' in 'where clause' mysql> select libro.idlibro,libro.descripcion,autor.codautor,autor.nombre from libro,liautedi,autor where libro.idlibro = liautedi.idlibro and liautedi.codautor = autor.codautor and autor.nombre='Riaz Khadem'; +---------+-------------+----------+-------------+ | idlibro | descripcion | codautor | nombre | +---------+-------------+----------+-------------+ | L04 | Ingles | A04 | Riaz Khadem | | L04 | Ingles | A04 | Riaz Khadem | | L04 | Ingles | A04 | Riaz Khadem | +---------+-------------+----------+-------------+ 3 rows in set (0.06 sec) mysql> select libro.idlibro,libro.descripcion,autor.codautor,autor.nombre from libro,liautedi,autor where libro.idlibro = liautedi.idlibro and liautedi.codautor = autor.codautor and autor.nombre='Riaz Khadem' into outfile 'd:\A.xls; '> '; ERROR 1 (HY000): Can't create/write to file 'd:A.xls; ' (Errcode: 22 - Invalid argument) mysql> select libro.idlibro,libro.descripcion,autor.codautor,autor.nombre from libro,liautedi,autor where libro.idlibro = liautedi.idlibro and liautedi.codautor = autor.codautor and autor.nombre='Riaz Khadem' into outfile 'd:\A.xls'; Query OK, 3 rows affected (0.05 sec) mysql> select * from libro; +---------+---------------------+-----------+--------+------------+ | IdLibro | Descripcion | Nropagina | Precio | Codmateria | +---------+---------------------+-----------+--------+------------+ | L01 | Calculo II | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructura de datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 10500 | M04 | | L05 | Admon en una p gina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramaci¢n | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+------------+ 8 rows in set (0.02 sec) mysql> select * from editorial; +---------+--------------+ | Codedit | Nombre | +---------+--------------+ | E01 | Oveja Negra | | E02 | Norma | | E03 | Mc Graw Hill | +---------+--------------+ 3 rows in set (0.03 sec) mysql> select editorial.codedit,editorial.nombre,autor.codautor,autor.nombre from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liautedi.codedit = editorial.codedit and autor.nombre = 'Robert Lordert'; Empty set (0.00 sec) mysql> select editorial.codedit,editorial.nombre,autor.codautor,autor.nombre,liautedi.codautor,liautedi.codedit from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liautedi.codedit = editorial.codedit and autor.nombre = 'Robert Lordert'; Empty set (0.00 sec) mysql> select editorial.codedit,editorial.nombre,autor.codautor,autor.nombre, from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liautedi.codedit = editorial.codedit and autor.nombre = 'Robert Lordert'; 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 'from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liaut' at line 1 mysql> select editorial.codedit,editorial.nombre,autor.codautor,autor.nombre, from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liautedi.codedit = editorial.codedit and autor.nombre = 'Robert Lordert'; 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 'from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liaut' at line 1 mysql> select editorial.codedit,editorial.nombre,autor.codautor,autor.nombre, from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liautedi.codedit = editorial.codedit and autor.nombre = 'Robert Lordert'; 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 'from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liaut' at line 1 mysql> select editorial.codedit,editorial.nombre,autor.codautor,autor.nombre from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liautedi.codedit = editorial.codedit and autor.nombre = 'Robert Lordert'; Empty set (0.00 sec) mysql> select editorial.codedit,editorial.nombre,autor.codautor,autor.nombre from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liautedi.codedit = editorial.codedit and autor.nombre = 'Robert Lorber'; +---------+--------------+----------+---------------+ | codedit | nombre | codautor | nombre | +---------+--------------+----------+---------------+ | E03 | Mc Graw Hill | A05 | Robert Lorber | | E03 | Mc Graw Hill | A05 | Robert Lorber | +---------+--------------+----------+---------------+ 2 rows in set (0.00 sec) mysql> select editorial.codedit,editorial.nombre,autor.codautor,autor.nombre from editorial,liautedi,autor where autor.codautor = liautedi.codautor and liautedi.codedit = editorial.codedit and autor.nombre = 'Robert Lorber'into outfile 'd:\B.xls'; Query OK, 2 rows affected (0.05 sec) mysql> select * from libro; +---------+---------------------+-----------+--------+------------+ | IdLibro | Descripcion | Nropagina | Precio | Codmateria | +---------+---------------------+-----------+--------+------------+ | L01 | Calculo II | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructura de datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 10500 | M04 | | L05 | Admon en una p gina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramaci¢n | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+------------+ 8 rows in set (0.00 sec) mysql> select * from libro where precio idlibro between 'L02' and 'L07'; 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 'idlibro between 'L02' and 'L07'' at line 1 mysql> select * from libro where descripcion=BD II' and descripcion = 'Redes'; '> select * from libro where descripcion='BD II' and descripcion = 'Redes'; '> '; 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 'II' and descripcion = 'Redes'; select * from libro where descripcion='BD II' and' at line 1 mysql> select * from libro where descripcion='BD II' and descripcion = 'Redes'; Empty set (0.00 sec) mysql> select * from libro where descripcion='BD II' or descripcion = 'Redes'; +---------+-------------+-----------+--------+------------+ | IdLibro | Descripcion | Nropagina | Precio | Codmateria | +---------+-------------+-----------+--------+------------+ | L02 | BD II | 150 | 65000 | M09 | | L07 | Redes | 370 | 32500 | M07 | +---------+-------------+-----------+--------+------------+ 2 rows in set (0.00 sec) mysql> select descripcion,precio from libro where descripcion='BD II' or descripcion = 'Redes'; +-------------+--------+ | descripcion | precio | +-------------+--------+ | BD II | 65000 | | Redes | 32500 | +-------------+--------+ 2 rows in set (0.00 sec) mysql> select descripcion,precio from libro where descripcion='BD II' or descripcion = 'Redes' into outfile 'd:\C.xls'; Query OK, 2 rows affected (0.05 sec) mysql> exit; mysql> source "C:\Users\Jonathan Vasquez\Desktop\tarea bd\copialibreria.sql" ERROR: Failed to open file '"C:\Users\Jonathan Vasquez\Desktop\tarea bd\copialibreria.sql"', error: 22 mysql> source C:\Users\Jonathan Vasquez\Desktop\tarea bd\copialibreria.sql Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.10 sec) Database changed Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.59 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 9 rows affected (0.06 sec) Records: 9 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.25 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 6 rows affected (0.03 sec) Records: 6 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.47 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 3 rows affected (0.11 sec) Records: 3 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.06 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.78 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 7 rows affected (0.05 sec) Records: 7 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.89 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 8 rows affected (0.08 sec) Records: 8 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> mysql> use libreria; Database changed mysql> show tables; +--------------------+ | Tables_in_libreria | +--------------------+ | asignatura | | autor | | editorial | | liautedi | | libro | +--------------------+ 5 rows in set (0.14 sec) mysql> select sum(precio) from libro where nropagina<180; +-------------+ | sum(precio) | +-------------+ | 200000 | +-------------+ 1 row in set (0.66 sec) mysql> select * from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | Calculo II | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.05 sec) mysql> select sum(precio) from libro where nropagina<180 into outfile 'd:\E.xls'; Query OK, 1 row affected (0.16 sec) mysql> exit; mysql> source C:\Users\Jonathan Vasquez\Desktop\tarea bd\copialibreria.sql Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Database changed Query OK, 0 rows affected (0.16 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.28 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 9 rows affected (0.02 sec) Records: 9 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.09 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.30 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 6 rows affected (0.02 sec) Records: 6 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.09 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.31 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 3 rows affected (0.03 sec) Records: 3 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.13 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.47 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 7 rows affected (0.02 sec) Records: 7 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.11 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.34 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 8 rows affected (0.06 sec) Records: 8 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | comandos | | credito | | libreria | | mysql | | registros | | tarea | +--------------------+ 7 rows in set (0.08 sec) mysql> use libreria; Database changed mysql> show tables; +--------------------+ | Tables_in_libreria | +--------------------+ | asignatura | | autor | | editorial | | liautedi | | libro | +--------------------+ 5 rows in set (0.00 sec) mysql> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Mc Graw Hill'; +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+--------------+ | idlibro | descripcion | nropagina | precio | codigomat | idlibro | codautor | codedit | codedit | nombre | +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+--------------+ | L02 | BD II | 150 | 65000 | M09 | L02 | A05 | E03 | E03 | Mc Graw Hill | | L07 | Redes | 370 | 32500 | M07 | L07 | A05 | E03 | E03 | Mc Graw Hill | | L04 | Ingles | 280 | 105000 | M04 | L04 | A04 | E03 | E03 | Mc Graw Hill | +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+--------------+ 3 rows in set (0.08 sec) mysql> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Mc Graw Hill' into outfile 'd:\F.xls; '> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Mc Graw Hill' into outfile 'd:\F.xls'; ERROR: Unknown command '\F'. '> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Mc Graw Hill' into outfile 'd:\f.xls'; ERROR: Unknown command '\f'. '> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Mc Graw Hill' into outfile 'd:\consulta f.xls'; '> ; '> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Mc Graw Hill' into outfile 'd:\F.xls'; ERROR: Unknown command '\F'. '> '; 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 'onsulta f.xls'; ; select * from libro inner join liautedi on libro.idlibro = lia' at line 1 mysql> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Mc Graw Hill' into outfile 'd:\F.xls'; Query OK, 3 rows affected (0.03 sec) mysql> select * from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | Calculo II | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.00 sec) mysql> select * from libro where like "E%"; 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 'like "E%"' at line 1 mysql> select * from libro where like 'e%'; 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 'like 'e%'' at line 1 mysql> select * from libro where nombre like "E%"; ERROR 1054 (42S22): Unknown column 'nombre' in 'where clause' mysql> select * from libro where descripcion like "E%"; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L03 | Estructara de Datos | 180 | 85000 | M03 | +---------+---------------------+-----------+--------+-----------+ 1 row in set (0.03 sec) mysql> select * from libro where descripcion like "E%" into outfile 'd:\G1.xls'; Query OK, 1 row affected (0.00 sec) mysql> select * from libro where descripcion like "%A"; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L05 | Admon en una Pagina | 70 | 7500 | M05 | +---------+---------------------+-----------+--------+-----------+ 1 row in set (0.00 sec) mysql> select * from libro where descripcion like "%A" into outfile 'd:\G2.xls'; Query OK, 1 row affected (0.00 sec) mysql> select * from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | Calculo II | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.00 sec) mysql> mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01'; Query OK, 1 row affected (0.13 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | calculo diferencial | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.00 sec) mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01' into outfile 'd:\H.xls'; 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 'into outfile 'd:\H.xls'' at line 1 mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01' into outfile 'd:\H1.xls'; 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 'into outfile 'd:\H1.xls'' at line 1 mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01' ; Query OK, 0 rows affected (0.06 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01' into outfile 'd:\E1.xls'; 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 'into outfile 'd:\E1.xls'' at line 1 mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01' into outfile 'd:\A.xls'; 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 'into outfile 'd:\A.xls'' at line 1 mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01'; Query OK, 0 rows affected (0.06 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql> select* from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | calculo diferencial | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.00 sec) mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01'into outfile 'd:\B.xls'; 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 'into outfile 'd:\B.xls'' at line 1 mysql> update libro set descripcion='calculo diferencial' where idlibro = 'L01'; Query OK, 0 rows affected (0.06 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql> select * from libro into outfile 'd:\H.xls'; Query OK, 8 rows affected (0.00 sec) mysql> select * from libro where idlibro between 'L05' and 'L07' and 'L08'; Empty set, 1 warning (0.06 sec) mysql> select * from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | calculo diferencial | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.00 sec) mysql> select * from libro where idlibro between 'L05' and 'L07' and 'L08'; Empty set, 1 warning (0.00 sec) mysql> select * from libro where idlibro between 'L05' or 'L07' or 'L08'; 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 'or 'L07' or 'L08'' at line 1 mysql> mysql> mysql> mysql> select * from libro where idlibro 'L05' and 'L07' and 'L08'; 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 ''L05' and 'L07' and 'L08'' at line 1 mysql> mysql> mysql> mysql> select * from libro where idlibro = 'L05' and idLibro= 'L07' and idLibro='L08'; Empty set (0.00 sec) mysql> select * from libro where idlibro = 'L05' and idlibro= 'L07' and idlibro='L08'; Empty set (0.00 sec) mysql> mysql> select idlibro, descripcion where idlibro = 'L05' and idlibro= 'L07' and idlibro='L08'; 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 'where idlibro = 'L05' and idlibro= 'L07' and idlibro='L08'' at line 1 mysql> mysql> select idlibro, descripcion frm libro where idlibro = 'L05' and idlibro= 'L07' and idlibro='L08'; 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 'libro where idlibro = 'L05' and idlibro= 'L07' and idlibro='L08'' at line 1 mysql> mysql> mysql> mysql> mysql> select idlibro, descripcion from libro where idlibro = 'L05' and idlibro= 'L07' and idlibro='L08'; Empty set (0.00 sec) mysql> select idlibro, descripcion from libro where idlibro = 'L05' and idlibro= 'L07' and idlibro='L08'; Empty set (0.00 sec) mysql> select * from libro where idlibro = 'L05' and idlibro= 'L07' and idlibro='L08'; Empty set (0.00 sec) mysql> select * from libro where idlibro = 'L05' ; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L05 | Admon en una Pagina | 70 | 7500 | M05 | +---------+---------------------+-----------+--------+-----------+ 1 row in set (0.00 sec) mysql> select * from libro -> where idlibro='L05'; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L05 | Admon en una Pagina | 70 | 7500 | M05 | +---------+---------------------+-----------+--------+-----------+ 1 row in set (0.00 sec) mysql> select * from libro -> where idlibro='L05' and -> idlibro='L07'; Empty set (0.00 sec) mysql> select * from libro -> where idlibro='L05' and -> idlibro='L07'; Empty set (0.00 sec) mysql> mysql> mysql> where idlibro='L05' or -> ; 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 'where idlibro='L05' or' at line 1 mysql> mysql> mysql> mysql> select * from libro -> where idlibro='L05' or -> idlibro='L07'; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L07 | Redes | 370 | 32500 | M07 | +---------+---------------------+-----------+--------+-----------+ 2 rows in set (0.00 sec) mysql> select * from libro -> where idlibro='L05' or -> idlibro='L07' or -> idlibro='L08'; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 3 rows in set (0.00 sec) mysql> select * from libro -> where idlibro='L05' or -> idlibro='L07' or -> idlibro='L08' into outfile 'd:\I.xls'; Query OK, 3 rows affected (0.00 sec) mysql> select*from librio; ERROR 1146 (42S02): Table 'libreria.librio' doesn't exist mysql> select*from librio; ERROR 1146 (42S02): Table 'libreria.librio' doesn't exist mysql> mysql> select*from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | calculo diferencial | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.00 sec) mysql> min(nropagina) from libro; 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 'min(nropagina) from libro' at line 1 mysql> mysql> mysql> select min(nropagina) from libro; +----------------+ | min(nropagina) | +----------------+ | 70 | +----------------+ 1 row in set (0.00 sec) mysql> select as minimo_numero_paginas min(nropagina) from libro; 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 'as minimo_numero_paginas min(nropagina) from libro' at line 1 mysql> mysql> mysql> select min(nropagina) as numero from libro; +--------+ | numero | +--------+ | 70 | +--------+ 1 row in set (0.00 sec) mysql> select min(nropagina) as min_nro_pag from libro; +-------------+ | min_nro_pag | +-------------+ | 70 | +-------------+ 1 row in set (0.01 sec) mysql> select min(nropagina) as min_nro_pag from libro into outfile 'd:\J.xls'; Query OK, 1 row affected (0.00 sec) mysql> select max(precio) as min_nro_pag from libro; +-------------+ | min_nro_pag | +-------------+ | 105000 | +-------------+ 1 row in set (0.00 sec) mysql> select*from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | calculo diferencial | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.00 sec) mysql> select max(precio) as libro_max_precio from libro; +------------------+ | libro_max_precio | +------------------+ | 105000 | +------------------+ 1 row in set (0.00 sec) mysql> select max(precio) as libro_max_precio from libro into outfile 'd:\K.xls'; Query OK, 1 row affected (0.00 sec) mysql> select avg(precio) as libro_max_precio from libro; +------------------+ | libro_max_precio | +------------------+ | 52812.5000 | +------------------+ 1 row in set (0.05 sec) mysql> select avg(precio) as prom_librosfrom libro; 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 'libro' at line 1 mysql> mysql> select avg(precio) as prom_libros from libro; +-------------+ | prom_libros | +-------------+ | 52812.5000 | +-------------+ 1 row in set (0.00 sec) mysql> select avg(precio) as prom_libros from libro into outfile 'd:\L.xls'; Query OK, 1 row affected (0.05 sec) mysql> alter table editorial change nombre descripcion; 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> mysql> alter table editorial change nombre descripcion varchar(30); Query OK, 3 rows affected (0.75 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> describe editorial; +-------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+-------+ | codedit | char(3) | NO | PRI | NULL | | | descripcion | varchar(30) | YES | | NULL | | +-------------+-------------+------+-----+---------+-------+ 2 rows in set (0.06 sec) mysql> select * from editorial; +---------+--------------+ | codedit | descripcion | +---------+--------------+ | E01 | Oveja Negra | | E02 | Norma | | E03 | Mc Graw Hill | +---------+--------------+ 3 rows in set (0.00 sec) mysql> select * from editorial into outfile 'd:\M.xls'; Query OK, 3 rows affected (0.00 sec) mysql> select * from editorial; +---------+--------------+ | codedit | descripcion | +---------+--------------+ | E01 | Oveja Negra | | E02 | Norma | | E03 | Mc Graw Hill | +---------+--------------+ 3 rows in set (0.00 sec) mysql> mysql> mysql> select * from editorial -> where descripcion like = '%Oveja%'; 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 '= '%Oveja%'' at line 2 mysql> mysql> mysql> mysql> select * from editorial -> -> ; +---------+--------------+ | codedit | descripcion | +---------+--------------+ | E01 | Oveja Negra | | E02 | Norma | | E03 | Mc Graw Hill | +---------+--------------+ 3 rows in set (0.00 sec) mysql> mysql> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Mc Graw Hill' into outfile 'd:\F.xls'; ERROR 1054 (42S22): Unknown column 'editorial.nombre' in 'where clause' mysql> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit=editorial.codedit where editorial.nombre = 'Oveja Negra'; ERROR 1054 (42S22): Unknown column 'editorial.nombre' in 'where clause' mysql> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit = editorial.codedit where editorial.descripcion = 'Oveja Negra'; +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+-------------+ | idlibro | descripcion | nropagina | precio | codigomat | idlibro | codautor | codedit | codedit | descripcion | +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+-------------+ | L02 | BD II | 150 | 65000 | M09 | L02 | A01 | E01 | E01 | Oveja Negra | | L04 | Ingles | 280 | 105000 | M04 | L04 | A04 | E01 | E01 | Oveja Negra | +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+-------------+ 2 rows in set (0.00 sec) mysql> select * from libro inner join liautedi on libro.idlibro = liautedi.idlibro inner join editorial on liautedi.codedit = editorial.codedit where editorial.descripcion = 'Oveja Negra' into outfile 'd:\N.xls'; Query OK, 2 rows affected (0.00 sec) mysql> select * from autor; +----------+----------------------+ | codautor | nombre | +----------+----------------------+ | A01 | Luis Joyanes | | A02 | Jorge Vasquez Posada | | A03 | Jhon Soars | | A04 | Riaz Khadem | | A05 | Robert Lorber | | A06 | Mario Dream | +----------+----------------------+ 6 rows in set (0.00 sec) mysql> select * from libro; +---------+---------------------+-----------+--------+-----------+ | idlibro | descripcion | nropagina | precio | codigomat | +---------+---------------------+-----------+--------+-----------+ | L01 | calculo diferencial | 120 | 55000 | M01 | | L02 | BD II | 150 | 65000 | M09 | | L03 | Estructara de Datos | 180 | 85000 | M03 | | L04 | Ingles | 280 | 105000 | M04 | | L05 | Admon en una Pagina | 70 | 7500 | M05 | | L06 | Contabilidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | | L08 | Diagramacion | 85 | 45000 | M08 | +---------+---------------------+-----------+--------+-----------+ 8 rows in set (0.00 sec) mysql> select * from autor inner join liautedi on autor.codautor = liautedi.codautor inner join libro on libro.idlibro =liautedi.idlibro inner join editorial on editorial.codedit = liautedi.codautor where idlibro = 'L02'; ERROR 1052 (23000): Column 'idlibro' in where clause is ambiguous mysql> select * from autor inner join liautedi on autor.codautor = liautedi.codautor inner join libro on libro.idlibro =liautedi.idlibro inner join editorial on editorial.codedit = liautedi.codautor where libro.descripcion = 'BD II'; Empty set (0.00 sec) mysql> select * from autor inner join liautedi on autor.codautor = liautedi.codautor inner join libro on libro.idlibro =liautedi.idlibro inner join editorial on editorial.codedit = liautedi.codautor ; Empty set (0.00 sec) mysql> select * from autor inner join liautedi on autor.codautor = liautedi.codautor inner join libro on libro.idlibro =liautedi.idlibro inner join liautedi on liautedi.codedit = editorial.codautor where libro.descripcion = 'BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> select * from autor inner join liautedi on autor.codautor = liautedi.codautor inner join libro on libro.idlibro =liautedi.idlibro inner join liautedi on liautedi.codedit = editorial.codautor where libro.descripcion = 'BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> select * from autor inner join liautedi on autor.codautor = liautedi.codautor inner join libro on libro.idlibro =liautedi.idlibro inner join liautedi on liautedi.codedit = editorial.codedit where libro.descripcion = 'BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> select * from autor inner join autor on autor.codautor = liautedi.codautor inner join liautedi on liautedi.idlibro =libro.idlibro inner join liautedi on liautedi.codedit = editorial.codedit where libro.descripcion = 'BD II'; ERROR 1066 (42000): Not unique table/alias: 'autor' mysql> mysql> mysql> mysql> select * from autor -> inner join liautedi on autor.codautor=liautedi.codautor -> inner join libro on liautedi.idlibro=libro.idlibro -> inner join liautedi on editorial.codedit=liautedi.codedit -> ; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> mysql> mysql> select * from autor -> inner join liautedi on autor.codautor=liautedi.codautor -> inner join libro on liautedi.idlibro=libro.idlibro -> inner join liautedi on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> mysql> select * from autor -> inner join libro on liautedi.idlibro=libro.idlibro -> ; ERROR 1054 (42S22): Unknown column 'liautedi.idlibro' in 'on clause' mysql> mysql> mysql> select * from autor -> inner join liautedi on autor.codautor=liautedi.codautor -> inner join libro on liautedi.idlibro=libro.idlibro -> inner join liautedi on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> mysql> select * from editorial -> inner join liautedi on autor.codautor=liautedi.codautor -> inner join libro on liautedi.idlibro=libro.idlibro -> inner join liautedi on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> mysql> select*from editorial -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join liautedi on libro.idlibro=liautedi.idlibro -> inner join libro on liautedi.idlibro=libro.idlibro -> inner join autor on liautedi.codautor=autor.codautor -> where libro.descripcion = 'BD II'; ERROR 1066 (42000): Not unique table/alias: 'editorial' mysql> mysql> mysql> mysql> select*from autor -> inner join liautedi on autor.codautor=liautedi.codautor -> inner join libro on liautedi.idlibro=libro.idlibro -> inner join liautedi on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> mysql> select*from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join liautedi on liautedi.codautor=autor.codautor -> where libro.descripcion='BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> mysql> select*from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+--------------+ | idlibro | descripcion | nropagina | precio | codigomat | idlibro | codautor | codedit | codedit | descripcion | +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+--------------+ | L02 | BD II | 150 | 65000 | M09 | L02 | A01 | E01 | E01 | Oveja Negra | | L02 | BD II | 150 | 65000 | M09 | L02 | A05 | E03 | E03 | Mc Graw Hill | +---------+-------------+-----------+--------+-----------+---------+----------+---------+---------+--------------+ 2 rows in set (0.00 sec) mysql> select*from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join liautedi on liautedi.codautor=autor.codautor -> where libro.descripcion='BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> select autor.nombre, editorial.descripcion libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join liautedi on liautedi.codautor=autor.codautor -> where libro.descripcion='BD II'; 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 'inner join liautedi on liautedi.idlibro=libro.idlibro inner join editorial on ed' at line 2 mysql> mysql> mysql> mysql> select autor.nombre, editorial.descripcion autor -> -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join liautedi on liautedi.codautor=autor.codautor -> where libro.descripcion='BD II'; 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 'inner join liautedi on liautedi.idlibro=libro.idlibro inner join editorial on ed' at line 3 mysql> mysql> mysql> mysql> mysql> mysql> select*from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join liautedi on liautedi.codautor=autor.codautor -> where libro.descripcion='BD II'; ERROR 1066 (42000): Not unique table/alias: 'liautedi' mysql> mysql> mysql> mysql> where libro.descripcion='BD II';into outfile 'd:\G1.xls'into outfile 'd:\G1.xls'into outfile 'd:\G1.xls' 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 'where libro.descripcion='BD II'' at line 1 -> -> -> -> ; 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 'into outfile 'd:\G1.xls'into outfile 'd:\G1.xls'into outfile 'd:\G1.xls'' at line 1 mysql> mysql> mysql> mysql> select libro.titulo from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1054 (42S22): Unknown column 'libro.titulo' in 'field list' mysql> mysql> mysql> select libro.titulo from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1054 (42S22): Unknown column 'libro.titulo' in 'field list' mysql> select libro.descripcion from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; +-------------+ | descripcion | +-------------+ | BD II | | BD II | +-------------+ 2 rows in set (0.00 sec) mysql> select libro.descripcion, autor.nombre from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1054 (42S22): Unknown column 'autor.nombre' in 'field list' mysql> mysql> mysql> mysql> select autor.nombre from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II';select autor.nombre from libro ERROR 1054 (42S22): Unknown column 'autor.nombre' in 'field list' -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II';select autor.nombre from libro ERROR 1054 (42S22): Unknown column 'autor.nombre' in 'field list' -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1054 (42S22): Unknown column 'autor.nombre' in 'field list' mysql> mysql> mysql> mysql> mysql> select autor.nombre from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1054 (42S22): Unknown column 'autor.nombre' in 'field list' mysql> mysql> mysql> select autor.nombre from autor -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1054 (42S22): Unknown column 'libro.descripcion' in 'where clause' mysql> mysql> mysql> mysql> mysql> select libro.descripcion from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; +-------------+ | descripcion | +-------------+ | BD II | | BD II | +-------------+ 2 rows in set (0.00 sec) mysql> select libro.descripcion, autor.nombre from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1054 (42S22): Unknown column 'autor.nombre' in 'field list' mysql> select libro.descripcion, autor.nombre from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II' and autor.nombre; ERROR 1054 (42S22): Unknown column 'autor.nombre' in 'field list' mysql> mysql> mysql> select libro.descripcion, editorial.descripcion from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; +-------------+--------------+ | descripcion | descripcion | +-------------+--------------+ | BD II | Oveja Negra | | BD II | Mc Graw Hill | +-------------+--------------+ 2 rows in set (0.00 sec) mysql> select libro.descripcion, editorial.descripcion, autor.nombre from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; ERROR 1054 (42S22): Unknown column 'autor.nombre' in 'field list' mysql> mysql> mysql> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> where libro.descripcion='BD II'; 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 'inner join liautedi on liautedi.idlibro=libro.idlibro inner join editorial on ed' at line 1 mysql> mysql> select libro.descripcion, editorial.descripcion, autor.codautor from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join autor autor.codautor=liautedi.codautor -> where libro.descripcion='BD II'; 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 '.codautor=liautedi.codautor where libro.descripcion='BD II'' at line 4 mysql> mysql> mysql> mysql> mysql> select libro.descripcion, editorial.descripcion, autor.codautor from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join autor on autor.codautor=liautedi.codautor -> where libro.descripcion='BD II'; +-------------+--------------+----------+ | descripcion | descripcion | codautor | +-------------+--------------+----------+ | BD II | Oveja Negra | A01 | | BD II | Mc Graw Hill | A05 | +-------------+--------------+----------+ 2 rows in set (0.00 sec) mysql> select libro.descripcion, editorial.descripcion, autor.nombre from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join autor on autor.codautor=liautedi.codautor -> where libro.descripcion='BD II'; +-------------+--------------+---------------+ | descripcion | descripcion | nombre | +-------------+--------------+---------------+ | BD II | Oveja Negra | Luis Joyanes | | BD II | Mc Graw Hill | Robert Lorber | +-------------+--------------+---------------+ 2 rows in set (0.00 sec) mysql> select libro.descripcion, editorial.descripcion, autor.nombre from libro -> inner join liautedi on liautedi.idlibro=libro.idlibro -> inner join editorial on editorial.codedit=liautedi.codedit -> inner join autor on autor.codautor=liautedi.codautor -> where libro.descripcion='BD II' into outfile 'd:\O.xls'; Query OK, 2 rows affected (0.00 sec) mysql> EXIT;