Subconsultas Mysql

Páginas: 4 (975 palabras) Publicado: 11 de junio de 2012
TALLER DE BASES DE DATOS
Alejandra Maleny Padilla Allende
Subconsultas

Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.C:\Windows\System32>mysql -u root -p
Enter password: ***
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.59-community MySQL Community Server(GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarksof their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database sub_consultas;
Query OK, 1 row affected (0.25 sec)mysql> use sub_consultas
Database changed
mysql> create table alumnos(nombre varchar(30), no_control int, materias varchar
(10));
Query OK, 0 rows affected (0.40 sec)

mysql> create tablematerias(nombre varchar(10), clave varchar(7), imparte varch
ar(20));
Query OK, 0 rows affected (0.07 sec)

mysql> insert into alumnos values('angel baez', 9753, 'mate4');
Query OK, 1 rowaffected (0.05 sec)

mysql> insert into alumnos values('angel baez', 9753, 'contabilidad');
ERROR 1406 (22001): Data too long for column 'materias' at row 1
mysql> insert into alumnosvalues('angel baez', 9753, 'conta');
Query OK, 1 row affected (0.01 sec)

mysql> insert into alumnos values('angel baez', 9753, 'BDD');
Query OK, 1 row affected (0.00 sec)

mysql> insert intoalumnos values('angel baez', 9753, 'simu');
Query OK, 1 row affected (0.00 sec)

mysql> insert into alumnos values('angel baez', 9753, 'teo');
Query OK, 1 row affected (0.01 sec)

mysql>insert into alumnos values('luis malta', 5281, 'teo');
Query OK, 1 row affected (0.01 sec)

mysql> insert into alumnos values('luis malta', 5281, 'mate1');
Query OK, 1 row affected (0.01 sec)...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • mysql practica subconsultas
  • SUBCONSULTAS
  • Subconsultas
  • mysql
  • Mysql
  • Mysql
  • Mysql
  • Mysql

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS