MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | phpmyadmin | | test | +--------------------+ 5 rows in set (0.025 sec) MariaDB [(none)]> source c:/xampp/libreria2.sql Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 1 row affected (0.001 sec) Database changed Query OK, 0 rows affected (0.051 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.018 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.001 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 6 rows affected (0.002 sec) Records: 6 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.003 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.010 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.001 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 3 rows affected (0.002 sec) Records: 3 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.032 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.001 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 7 rows affected (0.005 sec) Records: 7 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.025 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.001 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 7 rows affected (0.002 sec) Records: 7 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.029 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.001 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 9 rows affected (0.002 sec) Records: 9 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.003 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (0.000 sec) MariaDB [libreria]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | libreria | | mysql | | performance_schema | | phpmyadmin | | test | +--------------------+ 6 rows in set (0.001 sec) MariaDB [libreria]> show tables -> ; +--------------------+ | Tables_in_libreria | +--------------------+ | autor | | editorial | | liautedi | | libro | | materia | +--------------------+ 5 rows in set (0.001 sec) MariaDB [libreria]> select * from libro; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | | L04 | Ingl‚s | 280 | 105000 | M04 | | L05 | Admon en una p gina | 70 | 7500 | M05 | | L06 | Contabiloidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | +----------+---------------------+-------+--------+-----------+ 7 rows in set (0.001 sec) MariaDB [libreria]> describe libro; +-----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+-------------+------+-----+---------+-------+ | id_libro | varchar(10) | NO | PRI | NULL | | | Titulo | varchar(60) | NO | | NULL | | | Numpg | float | NO | | NULL | | | Precio | float | NO | | NULL | | | codigmat1 | varchar(10) | NO | MUL | NULL | | +-----------+-------------+------+-----+---------+-------+ 5 rows in set (0.020 sec) MariaDB [libreria]> show create table libro; +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | libro | CREATE TABLE `libro` ( `id_libro` varchar(10) NOT NULL, `Titulo` varchar(60) NOT NULL, `Numpg` float NOT NULL, `Precio` float NOT NULL, `codigmat1` varchar(10) NOT NULL, PRIMARY KEY (`id_libro`), KEY `codigmat1` (`codigmat1`), CONSTRAINT `libro_ibfk_1` FOREIGN KEY (`codigmat1`) REFERENCES `materia` (`codigmat`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci | +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.001 sec) MariaDB [libreria]> select * from autor; +--------+---------------------+ | codaut | Nombre | +--------+---------------------+ | A01 | Luis Joyanes | | A02 | Jorge Vaquez Posada | | A03 | Jhon Soars | | A04 | Riaz Khadem | | A05 | Robert Lorber | | A06 | Mario Dream | +--------+---------------------+ 6 rows in set (0.001 sec) MariaDB [libreria]> select * from materia; +----------+----------------------+ | codigmat | Nombre | +----------+----------------------+ | M01 | Calculo | | M02 | Matem ticas | | M03 | Estructura de Datos | | M04 | Ingl‚s | | M05 | Sistemas de Informac | | M06 | Contabilidad | | M07 | Redes | | M08 | Diagramaci˘n | | M09 | Base de Datos | +----------+----------------------+ 9 rows in set (0.001 sec) MariaDB [libreria]> select * from editorial; +---------+--------------+ | codedit | Nombre | +---------+--------------+ | E01 | Oveja Negra | | E02 | Norma | | E03 | Mc Graw Hill | +---------+--------------+ 3 rows in set (0.001 sec) MariaDB [libreria]> select * from liautedi; +-----------+---------+----------+ | id_libro1 | codaut1 | codedit1 | +-----------+---------+----------+ | L02 | A01 | E01 | | L02 | A05 | E03 | | L06 | A02 | E02 | | L07 | A05 | E03 | | L04 | A04 | E01 | | L04 | A04 | E02 | | L04 | A04 | E03 | +-----------+---------+----------+ 7 rows in set (0.000 sec) MariaDB [libreria]> show create table liautedi; +----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | liautedi | CREATE TABLE `liautedi` ( `id_libro1` varchar(10) NOT NULL, `codaut1` varchar(10) NOT NULL, `codedit1` varchar(10) NOT NULL, KEY `id_libro1` (`id_libro1`), KEY `codaut1` (`codaut1`), KEY `codedit1` (`codedit1`), CONSTRAINT `liautedi_ibfk_1` FOREIGN KEY (`id_libro1`) REFERENCES `libro` (`id_libro`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `liautedi_ibfk_2` FOREIGN KEY (`codaut1`) REFERENCES `autor` (`codaut`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `liautedi_ibfk_3` FOREIGN KEY (`codedit1`) REFERENCES `editorial` (`codedit`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci | +----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.000 sec) MariaDB [libreria]> select id_libro,titulo,precio from libro; +----------+---------------------+--------+ | id_libro | titulo | precio | +----------+---------------------+--------+ | L01 | C lculo II | 55000 | | L02 | Bd II | 65000 | | L03 | Estructura de Datos | 85000 | | L04 | Ingl‚s | 105000 | | L05 | Admon en una p gina | 7500 | | L06 | Contabiloidad I | 27500 | | L07 | Redes | 32500 | +----------+---------------------+--------+ 7 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where id_libro='L01'; +----------+------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | +----------+------------+-------+--------+-----------+ 1 row in set (0.001 sec) MariaDB [libreria]> select id_libro,titulo,numpg from libro where id_libro='L01'; +----------+------------+-------+ | id_libro | titulo | numpg | +----------+------------+-------+ | L01 | C lculo II | 120 | +----------+------------+-------+ 1 row in set (0.001 sec) MariaDB [libreria]> describe libro; +-----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+-------------+------+-----+---------+-------+ | id_libro | varchar(10) | NO | PRI | NULL | | | Titulo | varchar(60) | NO | | NULL | | | Numpg | float | NO | | NULL | | | Precio | float | NO | | NULL | | | codigmat1 | varchar(10) | NO | MUL | NULL | | +-----------+-------------+------+-----+---------+-------+ 5 rows in set (0.014 sec) MariaDB [libreria]> select * from libro where numpg<160; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L05 | Admon en una p gina | 70 | 7500 | M05 | +----------+---------------------+-------+--------+-----------+ 3 rows in set (0.000 sec) MariaDB [libreria]> select descripcion,numpg,precio from libro where precio>5000; ERROR 1054 (42S22): Unknown column 'descripcion' in 'field list' MariaDB [libreria]> select titulo,numpg,precio from libro where precio>5000; +---------------------+-------+--------+ | titulo | numpg | precio | +---------------------+-------+--------+ | C lculo II | 120 | 55000 | | Bd II | 150 | 65000 | | Estructura de Datos | 180 | 85000 | | Ingl‚s | 280 | 105000 | | Admon en una p gina | 70 | 7500 | | Contabiloidad I | 170 | 27500 | | Redes | 370 | 32500 | +---------------------+-------+--------+ 7 rows in set (0.001 sec) MariaDB [libreria]> select titulo,numpg,precio from libro where precio5000; ERROR 1054 (42S22): Unknown column 'precio5000' in 'where clause' MariaDB [libreria]> select titulo,numpg,precio from libro where precio<=5000; Empty set (0.000 sec) MariaDB [libreria]> select * from libro; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | | L04 | Ingl‚s | 280 | 105000 | M04 | | L05 | Admon en una p gina | 70 | 7500 | M05 | | L06 | Contabiloidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | +----------+---------------------+-------+--------+-----------+ 7 rows in set (0.000 sec) MariaDB [libreria]> 1select * from libro where titulo='BD II'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1select * from libro where titulo='BD II'' at line 1 MariaDB [libreria]> 1select * from libro where titulo='Bd II'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1select * from libro where titulo='Bd II'' at line 1 MariaDB [libreria]> select * from libro where titulo='Bd II'; +----------+--------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+--------+-------+--------+-----------+ | L02 | Bd II | 150 | 65000 | M09 | +----------+--------+-------+--------+-----------+ 1 row in set (0.000 sec) MariaDB [libreria]> select * from libro where numpg>=100 and precio>=10000; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | | L04 | Ingl‚s | 280 | 105000 | M04 | | L06 | Contabiloidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | +----------+---------------------+-------+--------+-----------+ 6 rows in set (0.000 sec) MariaDB [libreria]> select * from libro where numpg<=100 and precio<=10000; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L05 | Admon en una p gina | 70 | 7500 | M05 | +----------+---------------------+-------+--------+-----------+ 1 row in set (0.001 sec) MariaDB [libreria]> select * from libro where id_libro='L01','L02,'L03'; '> ; '> ; '> '> select * from libro where id_libro='L01' or id_libro='L02' or id_libro='L03'; '> ' -> ' '> ' -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''L02,'L03'; ; ; select * from libro where id_libro='L01' or id_libro='L02' ...' at line 1 MariaDB [libreria]> select * from libro where id_libro='L01' or id_libro='L02' or id_libro='L03'; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | +----------+---------------------+-------+--------+-----------+ 3 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where id_libro>='L01' and id_libro<='L05'; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | | L04 | Ingl‚s | 280 | 105000 | M04 | | L05 | Admon en una p gina | 70 | 7500 | M05 | +----------+---------------------+-------+--------+-----------+ 5 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where id_libro in ('L01','L02','L03'); +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | +----------+---------------------+-------+--------+-----------+ 3 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where id_libro in ('L01','L02','L03','L04'); +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | | L04 | Ingl‚s | 280 | 105000 | M04 | +----------+---------------------+-------+--------+-----------+ 4 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where id_libro between 'L01' and 'L06'; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | | L04 | Ingl‚s | 280 | 105000 | M04 | | L05 | Admon en una p gina | 70 | 7500 | M05 | | L06 | Contabiloidad I | 170 | 27500 | M06 | +----------+---------------------+-------+--------+-----------+ 6 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where titulo like 'C%'; +----------+-----------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+-----------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L06 | Contabiloidad I | 170 | 27500 | M06 | +----------+-----------------+-------+--------+-----------+ 2 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where titulo like '%S'; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L03 | Estructura de Datos | 180 | 85000 | M03 | | L04 | Ingl‚s | 280 | 105000 | M04 | | L07 | Redes | 370 | 32500 | M07 | +----------+---------------------+-------+--------+-----------+ 3 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where titulo like '%t%'; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L03 | Estructura de Datos | 180 | 85000 | M03 | | L06 | Contabiloidad I | 170 | 27500 | M06 | +----------+---------------------+-------+--------+-----------+ 2 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where titulo like '%ii%'; +----------+------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | +----------+------------+-------+--------+-----------+ 2 rows in set (0.001 sec) MariaDB [libreria]> select * from libro where titulo like '%datos%'; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L03 | Estructura de Datos | 180 | 85000 | M03 | +----------+---------------------+-------+--------+-----------+ 1 row in set (0.001 sec) MariaDB [libreria]> select libro.id_libro.titulo,autor.codaut,autor.nombre from libro,autor,liautedi where libro.id_libro=liautedi.id_libro1 and liautedi.codaut1=autor.codaut; ERROR 1054 (42S22): Unknown column 'libro.id_libro.titulo' in 'field list' MariaDB [libreria]> select libro.id_libro,libro.titulo,autor.codaut,autor.nombre from libro,autor,liautedi where libro.id_libro=liautedi.id_libro1 and liautedi.codaut1=autor.codaut; +----------+-----------------+--------+---------------------+ | id_libro | titulo | codaut | nombre | +----------+-----------------+--------+---------------------+ | L02 | Bd II | A01 | Luis Joyanes | | L02 | Bd II | A05 | Robert Lorber | | L06 | Contabiloidad I | A02 | Jorge Vaquez Posada | | L07 | Redes | A05 | Robert Lorber | | L04 | Ingl‚s | A04 | Riaz Khadem | | L04 | Ingl‚s | A04 | Riaz Khadem | | L04 | Ingl‚s | A04 | Riaz Khadem | +----------+-----------------+--------+---------------------+ 7 rows in set (0.001 sec) MariaDB [libreria]> select distinct libro.id_libro,libro.titulo,autor.codaut,autor.nombre from libro,autor,liautedi where libro.id_libro=liautedi.id_libro1 and liautedi.codaut1=autor.codaut; +----------+-----------------+--------+---------------------+ | id_libro | titulo | codaut | nombre | +----------+-----------------+--------+---------------------+ | L02 | Bd II | A01 | Luis Joyanes | | L02 | Bd II | A05 | Robert Lorber | | L06 | Contabiloidad I | A02 | Jorge Vaquez Posada | | L07 | Redes | A05 | Robert Lorber | | L04 | Ingl‚s | A04 | Riaz Khadem | +----------+-----------------+--------+---------------------+ 5 rows in set (0.001 sec) MariaDB [libreria]> select * from libro; +----------+---------------------+-------+--------+-----------+ | id_libro | Titulo | Numpg | Precio | codigmat1 | +----------+---------------------+-------+--------+-----------+ | L01 | C lculo II | 120 | 55000 | M01 | | L02 | Bd II | 150 | 65000 | M09 | | L03 | Estructura de Datos | 180 | 85000 | M03 | | L04 | Ingl‚s | 280 | 105000 | M04 | | L05 | Admon en una p gina | 70 | 7500 | M05 | | L06 | Contabiloidad I | 170 | 27500 | M06 | | L07 | Redes | 370 | 32500 | M07 | +----------+---------------------+-------+--------+-----------+ 7 rows in set (0.001 sec) MariaDB [libreria]> select * from liautedi; +-----------+---------+----------+ | id_libro1 | codaut1 | codedit1 | +-----------+---------+----------+ | L02 | A01 | E01 | | L02 | A05 | E03 | | L06 | A02 | E02 | | L07 | A05 | E03 | | L04 | A04 | E01 | | L04 | A04 | E02 | | L04 | A04 | E03 | +-----------+---------+----------+ 7 rows in set (0.001 sec) MariaDB [libreria]> select * from autor; +--------+---------------------+ | codaut | Nombre | +--------+---------------------+ | A01 | Luis Joyanes | | A02 | Jorge Vaquez Posada | | A03 | Jhon Soars | | A04 | Riaz Khadem | | A05 | Robert Lorber | | A06 | Mario Dream | +--------+---------------------+ 6 rows in set (0.001 sec) MariaDB [libreria]> select * from autor; +--------+---------------------+ | codaut | Nombre | +--------+---------------------+ | A01 | Luis Joyanes | | A02 | Jorge Vaquez Posada | | A03 | Jhon Soars | | A04 | Riaz Khadem | | A05 | Robert Lorber | | A06 | Mario Dream | +--------+---------------------+ 6 rows in set (0.001 sec) MariaDB [libreria]> select distinct libro.id_libro,libro.titulo,autor.codaut,autor.nombre from libro,autor,liautedi where libro.id_libro=liautedi.id_libro1 and liautedi.codaut1=autor.codaut and libro.titulo='Estructura de Datos'; Empty set (0.001 sec) MariaDB [libreria]> select distinct libro.id_libro,libro.titulo,autor.codaut,autor.nombre from libro,autor,liautedi where libro.id_libro=liautedi.id_libro1 and liautedi.codaut1=autor.codaut; +----------+-----------------+--------+---------------------+ | id_libro | titulo | codaut | nombre | +----------+-----------------+--------+---------------------+ | L02 | Bd II | A01 | Luis Joyanes | | L02 | Bd II | A05 | Robert Lorber | | L06 | Contabiloidad I | A02 | Jorge Vaquez Posada | | L07 | Redes | A05 | Robert Lorber | | L04 | Ingl‚s | A04 | Riaz Khadem | +----------+-----------------+--------+---------------------+ 5 rows in set (0.001 sec) MariaDB [libreria]> exit;