Enter : **** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10 Server version: 5.7.19-log MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its s. All rights reserved. Oracle is a ed trademark of Oracle Corporation and/or its s. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use laboratorioSQL; Database changed mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | laboratoriosql | | mysql | | performance_schema | | sakila | | sys | | world | +--------------------+ 7 rows in set (0.06 sec) mysql> create table Estudiantexcurso( -> cod_cur_estcur int, -> doc_est_estcur int, -> fec_ini_estcur date. -> foreign key (cod_cur_estcur) references Curso(cod_curs), -> foreign key (doc_est_estcur) references Estudiante(doc_est) -> ); 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 '. foreign key (cod_cur_estcur) references Curso(cod_curs), foreign key (doc_est_' at line 4 mysql> create table Estudiantexcurdo( -> cod_cur_etcur int, -> doc_est_escur varchar, -> fec_ini_etcur date,; 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 ' fec_ini_etcur date,' at line 3 mysql> create table Estudiantexcurso( -> cod_cur_etcur int, -> doc_est_etcur varchar, -> fec_ini_etcur date, -> foreign key (cod_cur_etcur) references Curso(cod_curs), -> foreign key (doc_est_etcur) references Estudiante(doc_est) -> ); 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 ' fec_ini_etcur date, foreign key (cod_cur_etcur) references Curso(cod_curs), for' at line 3
mysql> create table Estudiantexcurso( -> cod_curs_etcur int, -> doc_est_etcur varchar, -> fec_ini_etcur date, -> foreign key (cod_curs_etcur) references Curso(cod_curs), -> foreign key (doc_est_etcur) references Estudiante(doc_est) -> ); 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 ' fec_ini_etcur date, foreign key (cod_curs_etcur) references Curso(cod_curs), fo' at line 3 mysql> isert into Profesor (doc_prof) -> values ('63.502.720'); 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 'isert into Profesor (doc_prof) values ('63.502.720')' at line 1 mysql> insert into profesor(doc_prof) values ('63.502.720'); Query OK, 1 row affected (1.95 sec) mysql> insert into profesor(doc_prof) values ('91.216.904'); Query OK, 1 row affected (0.16 sec) mysql> insert into profesor(doc_prof) values ('13.826.789'); Query OK, 1 row affected (0.08 sec) mysql> insert into profesor(doc_prof) values ('1.098.765.789'); ERROR 1406 (22001): Data too long for column 'doc_prof' at row 1 mysql> insert into profesor(doc_prof, nom_prof, ape_prof, cate_prof, sal_prof) values ('900.000.000','Alejandra','Torres',4,$1.100.000); ERROR 1054 (42S22): Unknown column '$1.100.000' in 'field list' mysql> insert into profesor(doc_prof, nom_prof, ape_prof, cate_prof, sal_prof) values ('99.000.000','Alejandra','Torres',4,1.100.000); 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 '.000)' at line 1 mysql> insert into profesor(doc_prof, nom_prof, ape_prof, cate_prof, sal_prof) values ('99.000.000','Alejandra','Torres',4,1.100.000); 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 '.000)' at line 1 mysql> insert into profesor(doc_prof, nom_prof, ape_prof, cate_prof, sal_prof) values ('99.000.000','Alejandra','Torres','4','1.100.000'); ERROR 1265 (01000): Data truncated for column 'sal_prof' at row 1 mysql> insert into profesor(doc_prof, nom_prof, ape_prof, cate_prof, sal_prof) values ('99.000.000','Alejandra','Torres',4,1100000); Query OK, 1 row affected (0.22 sec) mysql> select * from profesor; +------------+-----------+----------+-----------+----------+ | doc_prof | nom_prof | ape_prof | cate_prof | sal_prof | +------------+-----------+----------+-----------+----------+ | 13.826.789 | NULL | NULL | NULL | NULL | | 63.502.720 | NULL | NULL | NULL | NULL | | 91.216.904 | NULL | NULL | NULL | NULL | | 99.000.000 | Alejandra | Torres | 4 | 1100000 | +------------+-----------+----------+-----------+----------+ 4 rows in set (0.23 sec)
mysql> insert into profesor(nom_prof, ape_prof, cate_prof, sal_prof) values ('63.502.720','Martha','Rojas',2,690000); ERROR 1136 (21S01): Column count doesn't match value count at row 1 mysql> insert into profesor(nom_prof, ape_prof, cate_prof, sal_prof) values ('Martha','Rojas',2,690000); ERROR 1364 (HY000): Field 'doc_prof' doesn't have a default value mysql> insert into profesor(doc_prof, nom_prof, ape_prof, cate_prof, sal_prof) values ('63.502.720','Martha','Rojas',2,690000); ERROR 1062 (23000): Duplicate entry '63.502.720' for key 'PRIMARY' mysql> insert into profesor(nom_prof) values ('Martha'); ERROR 1364 (HY000): Field 'doc_prof' doesn't have a default value mysql> indert into profesor(nom_prof) values (Martha); 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 'indert into profesor(nom_prof) values (Martha)' at line 1 mysql> insert into profesor(nom_prof) values (Martha); ERROR 1054 (42S22): Unknown column 'Martha' in 'field list' mysql> selec * from profesor; 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 'selec * from profesor' at line 1 mysql> select * from profesor; +------------+-----------+----------+-----------+----------+ | doc_prof | nom_prof | ape_prof | cate_prof | sal_prof | +------------+-----------+----------+-----------+----------+ | 13.826.789 | NULL | NULL | NULL | NULL | | 63.502.720 | NULL | NULL | NULL | NULL | | 91.216.904 | NULL | NULL | NULL | NULL | | 99.000.000 | Alejandra | Torres | 4 | 1100000 | +------------+-----------+----------+-----------+----------+ 4 rows in set (0.03 sec) mysql> insert into profesor(nom_prof) values ('Martha'); ERROR 1364 (HY000): Field 'doc_prof' doesn't have a default value mysql> insert into profesor(ape_prof) values ('Rojas'); ERROR 1364 (HY000): Field 'doc_prof' doesn't have a default value mysql> insert into profesor(doc_prof, nom_prof, ape_prof) values ('','Martha','Rojas'); Query OK, 1 row affected (0.15 sec) mysql> insert into profesor(doc_prof, nom_prof, ape_prof, cate_prof, sal_prof) values ('','','',2,690000); ERROR 1062 (23000): Duplicate entry '' for key 'PRIMARY' mysql> select * from profesor; +------------+-----------+----------+-----------+----------+ | doc_prof | nom_prof | ape_prof | cate_prof | sal_prof | +------------+-----------+----------+-----------+----------+ | | Martha | Rojas | NULL | NULL | | 13.826.789 | NULL | NULL | NULL | NULL | | 63.502.720 | NULL | NULL | NULL | NULL | | 91.216.904 | NULL | NULL | NULL | NULL | | 99.000.000 | Alejandra | Torres | 4 | 1100000 | +------------+-----------+----------+-----------+----------+ 5 rows in set (0.00 sec) mysql> update profesor set nom_prof=' ' where doc_prof=' '; Query OK, 1 row affected (0.25 sec) Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from profesor; +------------+-----------+----------+-----------+----------+ | doc_prof | nom_prof | ape_prof | cate_prof | sal_prof | +------------+-----------+----------+-----------+----------+ | | | Rojas | NULL | NULL | | 13.826.789 | NULL | NULL | NULL | NULL | | 63.502.720 | NULL | NULL | NULL | NULL | | 91.216.904 | NULL | NULL | NULL | NULL | | 99.000.000 | Alejandra | Torres | 4 | 1100000 | +------------+-----------+----------+-----------+----------+ 5 rows in set (0.00 sec) mysql> update profesor set ape_prof=' ' where doc_prof=' '; Query OK, 1 row affected (0.12 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set nom_prof='Martha' where doc_prof='63.502.720'; Query OK, 1 row affected (0.14 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set ape_prof='Rojas' where doc_prof='63.502.720'; Query OK, 1 row affected (0.10 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set cate_prof=2 where doc_prof='63.502.720'; Query OK, 1 row affected (0.10 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set sal_prof=690000 where doc_prof='63.502.720'; Query OK, 1 row affected (0.12 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from profesor; +------------+-----------+----------+-----------+----------+ | doc_prof | nom_prof | ape_prof | cate_prof | sal_prof | +------------+-----------+----------+-----------+----------+ | | | | NULL | NULL | | 13.826.789 | NULL | NULL | NULL | NULL | | 63.502.720 | Martha | Rojas | 2 | 690000 | | 91.216.904 | NULL | NULL | NULL | NULL | | 99.000.000 | Alejandra | Torres | 4 | 1100000 | +------------+-----------+----------+-----------+----------+ 5 rows in set (0.00 sec) mysql> update profesor set sal_prof=950000 where doc_prof='91.216.904'; Query OK, 1 row affected (0.13 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set nom_prof='Carlos' where doc_prof='91.216.904'; Query OK, 1 row affected (0.12 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set ape_prof='Perez' where doc_prof='91.216.904'; Query OK, 1 row affected (0.17 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set cate_prof=3 where doc_prof='91.216.904'; Query OK, 1 row affected (0.18 sec)
Rows matched: 1
Changed: 1
Warnings: 0
mysql> update profesor set cate_prof=1 where doc_prof='13.826.789'; Query OK, 1 row affected (0.12 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set nom_prof='Maritza' where doc_prof='13.826.789'; Query OK, 1 row affected (0.06 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set ape_prof='Angarita' where doc_prof='13.826.789'; Query OK, 1 row affected (0.07 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> update profesor set sal_prof=550000 where doc_prof='13.826.789'; Query OK, 1 row affected (0.07 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from profesor; +------------+-----------+----------+-----------+----------+ | doc_prof | nom_prof | ape_prof | cate_prof | sal_prof | +------------+-----------+----------+-----------+----------+ | | | | NULL | NULL | | 13.826.789 | Maritza | Angarita | 1 | 550000 | | 63.502.720 | Martha | Rojas | 2 | 690000 | | 91.216.904 | Carlos | Perez | 3 | 950000 | | 99.000.000 | Alejandra | Torres | 4 | 1100000 | +------------+-----------+----------+-----------+----------+ 5 rows in set (0.00 sec) mysql> insert into curso(cod_curs, nom_curs, horas-cur, valor-cur) values (149842,'Fundamentos de bases de datos',40,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 '-cur, valor-cur) values (149842,'Fundamentos de bases de datos',40,500000)' at line 1 mysql> insert into curso(nom_curs, horas-cur, valor-cur) values ('Fundamentos de bases de datos',40,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 '-cur, valor-cur) values ('Fundamentos de bases de datos',40,500000)' at line 1 mysql> insert into curso(cod_curs, nom_curs, horas_cur, valo_cur) values (149842,'Fundamentos de bases de datos',40,500000); ERROR 1054 (42S22): Unknown column 'valo_cur' in 'field list' mysql> insert into curso(cod_curs, nom_curs, horas_cur, valor_cur) values (149842,'Fundamentos de bases de datos',40,500000); Query OK, 1 row affected (0.13 sec) mysql> insert into curso(cod_curs, nom_curs, horas_cur, valor_cur) values (250067,'Fundamentos de SQL',20,700000); Query OK, 1 row affected (0.13 sec) mysql> insert into curso(cod_curs, nom_curs, horas_cur, valor_cur) values (289011,'manejo de Mysql',45,550000); Query OK, 1 row affected (0.08 sec) mysql> insert into curso(cod_curs, nom_curs, horas_cur, valor_cur) values (345671,'Fundamental of Oracle',60,3000000); Query OK, 1 row affected (0.10 sec)
mysql> select * from curso; +----------+-------------------------------+-----------+-----------+ | cod_curs | nom_curs | horas_cur | valor_cur | +----------+-------------------------------+-----------+-----------+ | 149842 | Fundamentos de bases de datos | 40 | 500000 | | 250067 | Fundamentos de SQL | 20 | 700000 | | 289011 | manejo de Mysql | 45 | 550000 | | 345671 | Fundamental of Oracle | 60 | 3000000 | +----------+-------------------------------+-----------+-----------+ 4 rows in set (0.00 sec) mysql> insert into curso(doc_est, nom_est, ape_est, edad_est) values ('63.502.720','Maria','Perez',23); ERROR 1054 (42S22): Unknown column 'doc_est' in 'field list' mysql> insert into estudiante(doc_est, nom_est, ape_est, edad_est) values ('63.502.720','Maria','Perez',23); Query OK, 1 row affected (0.27 sec) mysql> insert into estudiante(doc_est, nom_est, ape_est, edad_est) values ('91.245.678','Carlos Jose','Lopez',25); Query OK, 1 row affected (0.12 sec) mysql> insert into estudiante(doc_est, nom_est, ape_est, edad_est) values ('98.098.097','Jonatan','Ardila',17); Query OK, 1 row affected (0.10 sec) mysql> insert into estudiante(doc_est, nom_est, ape_est, edad_est) values ('98.765.678','Carlos','Martinez',19); Query OK, 1 row affected (0.13 sec) mysql> select * from estudiante; +------------+-------------+----------+----------+ | doc_est | nom_est | ape_est | edad_est | +------------+-------------+----------+----------+ | 63.502.720 | Maria | Perez | 23 | | 91.245.678 | Carlos Jose | Lopez | 25 | | 98.098.097 | Jonatan | Ardila | 17 | | 98.765.678 | Carlos | Martinez | 19 | +------------+-------------+----------+----------+ 4 rows in set (0.00 sec) mysql> insert into Cliente(id_cli, nom_cli, ape_cli, dir_cli, dep_cli, mes_cum_cli) values ('63502718','Maritza','Rojas','Calle 34 No. 14-45)','Santander','Abril'; 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> insert into Cliente(id_cli, nom_cli, ape_cli, dir_cli, dep_cli, mes_cum_cli) values ('63502718','Maritza','Rojas','Calle 34 No. 14-45','Santander','Abril'); Query OK, 1 row affected (0.24 sec) mysql> insert into Cliente(id_cli, nom_cli, ape_cli, dir_cli, dep_cli, mes_cum_cli) values ('13890234','Roger','Ariza','Cra 30 No. 13-45','Antioquia','Junio'); Query OK, 1 row affected (0.12 sec) mysql> insert into Cliente(id_cli, nom_cli, ape_cli, dir_cli, dep_cli, mes_cum_cli) values ('77191956','Juan Carlos','Arenas','Diagonal 23 No. 12-34 apto 101','Valle','Marzo'); Query OK, 1 row affected (0.12 sec)
mysql> insert into Cliente(id_cli, nom_cli, ape_cli, dir_cli, dep_cli, mes_cum_cli) values ('1098765789','Catalina','Zapata','Av el libertador No. 3014','Cauca','Marzo'); Query OK, 1 row affected (0.10 sec) mysql> select * from Cliente; +------------+-------------+---------+--------------------------------+----------+-------------+ | id_cli | nom_cli | ape_cli | dir_cli | dep_cli | mes_cum_cli | +------------+-------------+---------+--------------------------------+----------+-------------+ | 1098765789 | Catalina | Zapata | Av el libertador No. 30-14 | Cauca | Marzo | | 13890234 | Roger | Ariza | Cra 30 No. 13-45 | Antioquia | Junio | | 63502718 | Maritza | Rojas | Calle 34 No. 14-45 | Santander | Abril | | 77191956 | Juan Carlos | Arenas | Diagonal 23 No. 12-34 apto 101 | Valle | Marzo | +------------+-------------+---------+--------------------------------+----------+-------------+ 4 rows in set (0.00 sec) mysql> insert into Articulo(id_art, tit_art, aut_art, edi_art, prec_art) values (1,'Redes cisco','Ernesto Arigasello','Alfaomega-Rama',60000); Query OK, 1 row affected (0.40 sec) mysql> insert into Articulo(id_art, tit_art, aut_art, edi_art, prec_art) values (2,'Facebook y twitter para adultos','Veloso Claudio','Alfaomega',52000); Query OK, 1 row affected (0.14 sec) mysql> insert into Articulo(id_art, tit_art, aut_art, edi_art, prec_art) values (3,'Creacion de un portal con php y mysql','Jacobo Pavon Puertas','AlfaomegaRama',40000); Query OK, 1 row affected (0.13 sec) mysql> insert into Articulo(id_art, tit_art, aut_art, edi_art, prec_art) values (4,'istracion de sistemas operativos','Julio Gomez Lopez','AlfaomegaRama',55000); Query OK, 1 row affected (0.14 sec) mysql> select * from articulo; +--------+---------------------------------------+---------------------+----------------+----------+ | id_art | tit_art | aut_art | edi_art | prec_art | +--------+---------------------------------------+---------------------+----------------+----------+ | 1 | Redes cisco | Ernesto Arigasello | Alfaomega-Rama | 60000 | | 2 | Facebook y twitter para adultos | Veloso Claudio | Alfaomega | 52000 | | 3 | Creacion de un portal con php y mysql | Jacobo Pavon Puertas | Alfaomega-Rama | 40000 | | 4 | istracion de sistemas operativos | Julio Gomez Lopez | Alfaomega-Rama | 55000 | +--------+---------------------------------------+---------------------+----------------+----------+
4 rows in set (0.00 sec) mysql> insert into pedido(id_ped, id_cli_ped, fec_ped, val_ped) values (1,'63502718','25/02/2017',120000); ERROR 1292 (22007): Incorrect date value: '25/02/2017' for column 'fec_ped' at row 1 mysql> insert into pedido(id_ped, id_cli_ped, fec_ped, val_ped) values (1,'63502718','25-02-2017',120000); ERROR 1292 (22007): Incorrect date value: '25-02-2017' for column 'fec_ped' at row 1 mysql> insert into pedido(id_ped, id_cli_ped, fec_ped, val_ped) values (1,'63502718','25_02_2017',120000); ERROR 1292 (22007): Incorrect date value: '25_02_2017' for column 'fec_ped' at row 1 mysql> insert into pedido(id_ped, id_cli_ped, fec_ped, val_ped) values (1,'63502718',25-02-2017,120000); ERROR 1292 (22007): Incorrect date value: '-1994' for column 'fec_ped' at row 1 mysql> insert into pedido(id_ped, id_cli_ped, fec_ped, val_ped) values (1,'63502718','2012-02-25',120000); Query OK, 1 row affected (0.28 sec) mysql> insert into pedido(id_ped, id_cli_ped, fec_ped, val_ped) values (2,'77191956','2012-04-30',55000); Query OK, 1 row affected (0.17 sec) mysql> insert into pedido(id_ped, id_cli_ped, fec_ped, val_ped) values (3,'63502718','2011-12-10',260000); Query OK, 1 row affected (0.08 sec) mysql> insert into pedido(id_ped, id_cli_ped, fec_ped, val_ped) values (4,'1098765789','2012-02-25',1800000); Query OK, 1 row affected (0.13 sec) mysql> select * from pedido; +--------+------------+------------+---------+ | id_ped | id_cli_ped | fec_ped | val_ped | +--------+------------+------------+---------+ | 1 | 63502718 | 2012-02-25 | 120000 | | 2 | 77191956 | 2012-04-30 | 55000 | | 3 | 63502718 | 2011-12-10 | 260000 | | 4 | 1098765789 | 2012-02-25 | 1800000 | +--------+------------+------------+---------+ 4 rows in set (0.00 sec) mysql> insert into articuloxpedido(id_ped_artped, id_art_artped, can_art_artped, val_ven_art_artped) values (1,3,5,40000); Query OK, 1 row affected (0.18 sec) mysql> insert into articuloxpedido(id_ped_artped, id_art_artped, can_art_artped, val_ven_art_artped) values (1,4,12,55000); Query OK, 1 row affected (0.13 sec) mysql> insert into articuloxpedido(id_ped_artped, id_art_artped, can_art_artped, val_ven_art_artped) values (2,1,5,65000); Query OK, 1 row affected (0.17 sec) mysql> insert into articuloxpedido(id_ped_artped, id_art_artped, can_art_artped, val_ven_art_artped) values (3,2,10,55000); Query OK, 1 row affected (0.11 sec)
mysql> insert into articuloxpedido(id_ped_artped, id_art_artped, can_art_artped, val_ven_art_artped) values (3,3,12,45000); Query OK, 1 row affected (0.10 sec) mysql> insert into articuloxpedido(id_ped_artped, id_art_artped, can_art_artped, val_ven_art_artped) values (4,1,20,65000); Query OK, 1 row affected (0.10 sec) mysql> select * from articuloxpedido; +---------------+---------------+----------------+--------------------+ | id_ped_artped | id_art_artped | can_art_artped | val_ven_art_artped | +---------------+---------------+----------------+--------------------+ | 1 | 3 | 5 | 40000 | | 1 | 4 | 12 | 55000 | | 2 | 1 | 5 | 65000 | | 3 | 2 | 10 | 55000 | | 3 | 3 | 12 | 45000 | | 4 | 1 | 20 | 65000 | +---------------+---------------+----------------+--------------------+ 6 rows in set (0.00 sec) mysql> insert into Compa�ia(comnit, comnombre, coma�ofun, comreplegal) values ('800890890-2','Seguros Atlantida',1998,'Carlos Lopez'); Query OK, 1 row affected (0.20 sec) mysql> insert into Compa�ia(comnit, comnombre, coma�ofun, comreplegal) values ('899999999-1','Aseguradora Rojas',1991,'Luis Fernando Rojas'); Query OK, 1 row affected (0.14 sec) mysql> insert into Compa�ia(comnit, comnombre, coma�ofun, comreplegal) values ('899999999-5','Seguros del Estadio',2001,'Maria Margarita Perez'); Query OK, 1 row affected (0.06 sec) mysql> select * from compa�ia; +-------------+---------------------+------------+-----------------------+ | comnit | comnombre | coma�ofun | comreplegal | +-------------+---------------------+------------+-----------------------+ | 800890890-2 | Seguros Atlantida | 1998 | Carlos Lopez | | 899999999-1 | Aseguradora Rojas | 1991 | Luis Fernando Rojas | | 899999999-5 | Seguros del Estadio | 2001 | Maria Margarita Perez | +-------------+---------------------+------------+-----------------------+ 3 rows in set (0.00 sec) mysql> insert into Tiposautomotores(auttipo, autnombre) values (1,'Automoviles'); ERROR 1054 (42S22): Unknown column 'autnombre' in 'field list' mysql> ALTER TABLE tiposautomotores ADD autnombre varchar(30); Query OK, 0 rows affected (2.28 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> select * from tiposautomotores; Empty set (0.00 sec) mysql> describe tiposautomotores; +-----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+-------------+------+-----+---------+-------+ | auttipo | int(11) | NO | PRI | NULL | | | autnombre | varchar(30) | YES | | NULL | |
+-----------+-------------+------+-----+---------+-------+ 2 rows in set (0.09 sec) mysql> insert into Tiposautomotores(auttipo, autnombre) values (1,'Automoviles'); Query OK, 1 row affected (0.07 sec) mysql> insert into Tiposautomotores(auttipo, autnombre) values (2,'Camperos'); Query OK, 1 row affected (0.13 sec) mysql> insert into Tiposautomotores(auttipo, autnombre) values (3,'Camiones'); Query OK, 1 row affected (0.09 sec) mysql> select * from tiposautomotores; +---------+-------------+ | auttipo | autnombre | +---------+-------------+ | 1 | Automoviles | | 2 | Camperos | | 3 | Camiones | +---------+-------------+ 3 rows in set (0.00 sec) mysql> insert into Automotores(autoplaca, automarca, autotipo, automodelo, autonumpasajeros, autocilindraje, autonumchasis) values ('FLL420','chevrolet corsa', 1, 2003, 5, 1400, 'wywzzz167kk009d25'); ERROR 1054 (42S22): Unknown column 'autotipo' in 'field list' mysql> insert into Automotores(autoplaca, automarca, auttipo, automodelo, autonumpasajeros, autocilindraje, autonumchasis) values ('FLL420','chevrolet corsa', 1, 2003, 5, 1400, 'wywzzz167kk009d25'); ERROR 1054 (42S22): Unknown column 'autonumpasajeros' in 'field list' mysql> insert into Automotores(autoplaca, automarca, auttipo, automodelo, autopasajeros, autocilindraje, autonumchasis) values ('FLL420','chevrolet corsa', 1, 2003, 5, 1400, 'wywzzz167kk009d25'); Query OK, 1 row affected (0.13 sec) mysql> insert into Automotores(autoplaca, automarca, auttipo, automodelo, autopasajeros, autocilindraje, autonumchasis) values ('DKZ820','renault stepway', 1, 2008, 5, 1600, 'wywzzz157kk009d45'); Query OK, 1 row affected (0.24 sec) mysql> insert into Automotores(autoplaca, automarca, auttipo, automodelo, autopasajeros, autocilindraje, autonumchasis) values ('KJQ920','kia sportage', 2, 2009, 7, 2000, 'wywzzz157kk009d25'); Query OK, 1 row affected (0.08 sec) mysql> select * from automotores; +-----------+-----------------+---------+------------+--------------+----------------+-------------------+ | autoplaca | automarca | auttipo | automodelo | autopasajeros | autocilindraje | autonumchasis | +-----------+-----------------+---------+------------+--------------+----------------+-------------------+ | DKZ820 | renault stepway | 1 | 2008 | 5 | 1600 | wywzzz157kk009d45 | | FLL420 | chevrolet corsa | 1 | 2003 | 5 | 1400 | wywzzz167kk009d25 | | KJQ920 | kia sportage | 2 | 2009 | 7 | 2000 | wywzzz157kk009d25 | +-----------+-----------------+---------+------------+---------------
+----------------+-------------------+ 3 rows in set (0.00 sec)