mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | automoviles | | biblioteca | | cdcol | | factura | | libreria | | mysql | | performance_schema | | phpmyadmin | | taller2 | | test | | webauth | +--------------------+ 12 rows in set (0.00 sec) mysql> use TALLER2; Database changed mysql> show tables; +-------------------+ | Tables_in_taller2 | +-------------------+ | cliente | | vendedor | +-------------------+ 2 rows in set (0.00 sec) mysql> describe VENDEDOR; +------------------------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------------+----------+------+-----+---------+-------+ | id_vendedor | char(10) | NO | PRI | NULL | | | nombre | char(40) | NO | | NULL | | | zona | char(15) | NO | | NULL | | | porcentaje_de_comision | float | NO | | NULL | | +------------------------+----------+------+-----+---------+-------+ 4 rows in set (0.05 sec) mysql> insert into VENDEDOR (id_vendedor,nombre,zona,porcentaje_de_comision) values ('004','Lina Ocampo','sur',0.5); Query OK, 1 row affected (0.17 sec) mysql> describe CLIENTE; +--------------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+----------+------+-----+---------+-------+ | id_cliente | char(10) | NO | PRI | NULL | | | nombre | char(40) | NO | | NULL | | | cupo_credito | float | NO | | NULL | | +--------------+----------+------+-----+---------+-------+ 3 rows in set (0.17 sec) mysql> insert into (id_cliente,nombre,cupo_credito) values ('50964','Oscar de leon',500000); 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 '(id_cliente,nombre,cupo_credito) values ('50964','Oscar de leon',500000)' at line 1 mysql> insert into CLIENTE (id_cliente,nombre,cupo_credito)values ('50964','Oscar de leon',500000); Query OK, 1 row affected (0.05 sec) mysql> insert into CLIENTE (id_cliente,nombre,cupo_credito)values ('85963','Ana Palencia',1000000); Query OK, 1 row affected (0.06 sec) mysql> insert into CLIENTE (id_cliente,nombre,cupo_credito)values('25147','Teresa Suarez',1200000); Query OK, 1 row affected (0.05 sec) mysql> insert into CLIENTE (id_cliente,nombre,cupo_credito)values ('36259','Shamir Beltran',700000); Query OK, 1 row affected (0.03 sec) mysql> select * from VENDEDOR; +-------------+----------------+--------+------------------------+ | id_vendedor | nombre | zona | porcentaje_de_comision | +-------------+----------------+--------+------------------------+ | 001 | luis Meza | norte | 0.5 | | 002 | Camilo Lleras | centro | 0.6 | | 003 | Sergio Agudelo | centro | 0.3 | | 004 | Lina Ocampo | sur | 0.5 | +-------------+----------------+--------+------------------------+ 4 rows in set (0.02 sec) mysql> select * from CLIENTE; +------------+----------------+--------------+ | id_cliente | nombre | cupo_credito | +------------+----------------+--------------+ | 25147 | Teresa Suarez | 1200000 | | 36259 | Shamir Beltran | 700000 | | 50964 | Oscar de leon | 500000 | | 85963 | Ana Palencia | 1000000 | +------------+----------------+--------------+ 4 rows in set (0.00 sec) mysql> select nombre from VENDEDOR where zona='norte'; +-----------+ | nombre | +-----------+ | luis Meza | +-----------+ 1 row in set (0.09 sec) mysql> select * from VENDEDOR where zona='centro'and porcentaje_comision=0.3; ERROR 1054 (42S22): Unknown column 'porcentaje_comision' in 'where clause' mysql> select * from VENDEDOR '%A%'; 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 ''%A%'' at line 1 mysql> select * from VENDEDOR where nombre like '%A%'; +-------------+----------------+--------+------------------------+ | id_vendedor | nombre | zona | porcentaje_de_comision | +-------------+----------------+--------+------------------------+ | 001 | luis Meza | norte | 0.5 | | 002 | Camilo Lleras | centro | 0.6 | | 003 | Sergio Agudelo | centro | 0.3 | | 004 | Lina Ocampo | sur | 0.5 | +-------------+----------------+--------+------------------------+ 4 rows in set (0.01 sec) mysql> select * from CLIENTE where nombre like '%A' and 'a%'; Empty set, 1 warning (0.03 sec) mysql> select * from CLIENTE where nombre like '%A' 'a%'; Empty set (0.00 sec) mysql> select * from CLIENTE where nombre like '%A' and like 'a%'; 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 'a%'' at line 1 mysql> select * from CLIENTE where nom,bre like '%A' and 'a%'; 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 'bre like '%A' and 'a%'' at line 1 mysql> select * from CLIENTE where nombre like '%Aa%'; Empty set (0.00 sec) mysql> select * from CLIENTE where cupo_credito >=500000 and <= 1000000; 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 '<= 1000000' at line 1 mysql> select nombre from cliente where cupo_credito >=500000 and <=1000000; 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 '<=1000000' at line 1 mysql> select * from CLIENTE order by campo_credito; ERROR 1054 (42S22): Unknown column 'campo_credito' in 'order clause' mysql> select * from CLIENTE order by cupo_credito; +------------+----------------+--------------+ | id_cliente | nombre | cupo_credito | +------------+----------------+--------------+ | 50964 | Oscar de leon | 500000 | | 36259 | Shamir Beltran | 700000 | | 85963 | Ana Palencia | 1000000 | | 25147 | Teresa Suarez | 1200000 | +------------+----------------+--------------+ 4 rows in set (0.13 sec) mysql> select * from VENDEDOR order by nombre desc; +-------------+----------------+--------+------------------------+ | id_vendedor | nombre | zona | porcentaje_de_comision | +-------------+----------------+--------+------------------------+ | 003 | Sergio Agudelo | centro | 0.3 | | 001 | luis Meza | norte | 0.5 | | 004 | Lina Ocampo | sur | 0.5 | | 002 | Camilo Lleras | centro | 0.6 | +-------------+----------------+--------+------------------------+ 4 rows in set (0.00 sec) mysql> update VENDEDOR set nombre='Yennifer Madrigal' where id_vendedor='001'; Query OK, 1 row affected (0.30 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from VENDEDOR; +-------------+-------------------+--------+------------------------+ | id_vendedor | nombre | zona | porcentaje_de_comision | +-------------+-------------------+--------+------------------------+ | 001 | Yennifer Madrigal | norte | 0.5 | | 002 | Camilo Lleras | centro | 0.6 | | 003 | Sergio Agudelo | centro | 0.3 | | 004 | Lina Ocampo | sur | 0.5 | +-------------+-------------------+--------+------------------------+ 4 rows in set (0.00 sec) mysql> delect from id_cliente where cupo_credito <= 500000; 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 'delect from id_cliente where cupo_credito <= 500000' at line 1 mysql> delect from CLIENTE where cupo_credito<=500000; 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 'delect from CLIENTE where cupo_credito<=500000' at line 1 mysql> select*from CLIENTES where cupo_credito 500000 and 1000000; 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 '500000 and 1000000' at line 1 mysql> select * from CLIENTE where cupo_credito >=500000 and cupo_credito <=1000000; +------------+----------------+--------------+ | id_cliente | nombre | cupo_credito | +------------+----------------+--------------+ | 36259 | Shamir Beltran | 700000 | | 50964 | Oscar de leon | 500000 | | 85963 | Ana Palencia | 1000000 | +------------+----------------+--------------+ 3 rows in set (0.00 sec) mysql> select * from CLIENTE where zona=centro and porcentaje_de_comision=0.3; ERROR 1054 (42S22): Unknown column 'zona' in 'where clause' mysql> mysqldump -B -uroot -p TALLER2>D:\TALLEREPASO2.sql Currently logging to file 'D:\definitivotaller2.txt' -> mysql>dump -B -uroot -p TALLER2>D:\TALLEREPASO2.sql Currently logging to file 'D:\definitivotaller2.txt' -> mysql>mysqldump -B -uroot -p TALLER2>D:\TALLER2609.sql Currently logging to file 'D:\definitivotaller2.txt' -> mysqwl> -> mysql> -> exit -> mysql>m exit -> exit -> * -> exit -> mysql/exit -> mysql>exit -> -> mysql>exit -> bin> -> bin>mysql -> bin>exit -> bin>mysqldump -B -uroot -p TALLER2>D:\tallerR2.sql