ERROR 1146 (42S02): Table 'laboratoriosql.cursos' doesn't exist mysql> select * from curso; +----------+-------------------------------+------------+------------+ | cod_curs | nom_curs | horas_curs | valor_curs | +----------+-------------------------------+------------+------------+ | 149842 | fundamentos de bases de datos | 40 | 500000 | | 250067 | fundamentos de sql | 20 | 700000 | | 289011 | manejo de mysql | 45 | 550000 | | 345671 | fundamentos de oracle | 60 | 3000000 | +----------+-------------------------------+------------+------------+ 4 rows in set (0.00 sec)
mysql> select * from curso where valor_curs>500000;
+----------+-----------------------+------------+------------+ | cod_curs | nom_curs | horas_curs | valor_curs | +----------+-----------------------+------------+------------+ | 250067 | fundamentos de sql | 20 | 700000 | | 289011 | manejo de mysql | 45 | 550000 | | 345671 | fundamentos de oracle | 60 | 3000000 | +----------+-----------------------+------------+------------+ 3 rows in set (0.00 sec)
mysql> select * from estudiantes;
ERROR 1146 (42S02): Table 'laboratoriosql.estudiantes' doesn't exist mysql> select * from estudiante; +------------+-------------+----------+----------+ | doc_est | nom_est | ape_est | edad_est | +------------+-------------+----------+----------+ | 1098098097 | jonatan | ardila | 17 | | 1098765678 | carlos | martinez | 19 | | 63502720 | maria | perez | 23 | | 91245678 | carlos jose | lopez | 25 | +------------+-------------+----------+----------+ 4 rows in set (0.03 sec)
mysql> select * from estudiante where edad_est>22;
+----------+-------------+---------+----------+ | doc_est | nom_est | ape_est | edad_est | +----------+-------------+---------+----------+ | 63502720 | maria | perez | 23 | | 91245678 | carlos jose | lopez | 25 | +----------+-------------+---------+----------+ 2 rows in set (0.00 sec)
mysql> select nom_est, edad_est from estudiante;
+-------------+----------+ | nom_est | edad_est | +-------------+----------+ | jonatan | 17 | | carlos | 19 | | maria | 23 | | carlos jose | 25 | +-------------+----------+ 4 rows in set (0.00 sec)
mysql> select nom_est, edad_est from estudiante where
-> edad_est= (select min(edad_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 '' at line 2 mysql> select nom_est, edad_est from estudiante where edad_est=min; ERROR 1054 (42S22): Unknown column 'min' in 'where clause' mysql> select min(edad_est) from estudiante; +---------------+ | min(edad_est) | +---------------+ | 17 | +---------------+ 1 row in set (0.04 sec)
mysql> select nom_est, min(edad_est) from estudiante;
+---------+---------------+ | nom_est | min(edad_est) | +---------+---------------+ | jonatan | 17 | +---------+---------------+ 1 row in set (0.00 sec)
mysql> select*from cursos;
ERROR 1146 (42S02): Table 'laboratoriosql.cursos' doesn't exist mysql> select*from curso; +----------+-------------------------------+------------+------------+ | cod_curs | nom_curs | horas_curs | valor_curs | +----------+-------------------------------+------------+------------+ | 149842 | fundamentos de bases de datos | 40 | 500000 | | 250067 | fundamentos de sql | 20 | 700000 | | 289011 | manejo de mysql | 45 | 550000 | | 345671 | fundamentos de oracle | 60 | 3000000 | +----------+-------------------------------+------------+------------+ 4 rows in set (0.00 sec)
mysql> select valor_curs, avg(valor_curs) from curso where horas_curs>40;
+------------+-----------------+ | valor_curs | avg(valor_curs) | +------------+-----------------+ | 550000 | 1775000.0000 | +------------+-----------------+ 1 row in set (0.04 sec)
mysql> select avg(valor_curs) from curso where horas_curs>40;
+-----------------+ | avg(valor_curs) | +-----------------+ | 1775000.0000 | +-----------------+ 1 row in set (0.00 sec)
curso.nom_curs, curso.horas_curs, curso.valor_curs estudiantexcurso.fec_ini_estcur from estudiante,c urso,estudiantexcuros where fec_ini_estcur=20110201; 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_estcur from estudiante,curso,estudiantexcuros where fec_ini_estcur=2011' at line 1 mysql> select estudiante.nom_est, estudiante.doc_est, curso.cod_curs, curso.nom_curs, curso.horas_curs, curso.valor_curs estudiantexcurso.fec_ini_estcur from estudiante,c urso,estudiantexcuros where fec_ini_estcur=20110201;