Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.
C:\Users\prueba>cd..
C:\Users>cd..
C:\>cd xampp
C:\xampp>cd mysql
C:\xampp\mysql>cd bin
C:\xampp\mysql\bin>mysql -hlocalhost -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.41 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use veterinaria
No connection. Trying to reconnect...
Connection id: 1
Current database: *** NONE ***
Database changed
mysql> show tables
-> ;
+-----------------------+
| Tables_in_veterinaria |
+-----------------------+
| caracteristicas |
| mascota |
| propietario |
+-----------------------+
3 rows in set (0.00 sec)
mysql> select from*caracteristicas;
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 'from*
caracteristicas' at line 1
mysql> select fromcaracteristicas;
ERROR 1054 (42S22): Unknown column 'fromcaracteristicas' in 'field list'
mysql> select* from caracteristicas;
+-----------+------------+----------+------------+---------------+----------+---
---------+------+
| Condicion | Pelaje | Tatuajes | Cicatrices | FinZootecnico | Cirujias | Co
lor | id_M |
+-----------+------------+----------+------------+---------------+----------+---
---------+------+
| estable | sedoso | no | no | mascota | no | ca
fe | NULL |
| Regular | maltratado | no | si | mascota | no | bl
anco | NULL |
| buena | grasoso | si | no | trabajo | si | ne
gro | NULL |
| mala | sedoso | si | si | trabajo | no | gr
is | NULL |
| Regular | maltratado | no | no | mascota | si | ca
fe claro | NULL |
+-----------+------------+----------+------------+---------------+----------+---
---------+------+
5 rows in set (0.00 sec)
mysql> select* from mascota;
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
| id_M | Nombre_M | Sexo_M | FechaNacimientos_M | Especie_M | peso_M | Raza_M
| Alzada_M |
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
| 0001 | Cosita | f | 2010-02-28 | Mamifero | 4 | pudul
| 10 mts |
| 0002 | Shastar | M | 2010-05-20 | Mamifero | 4 | Husky
| 3 mts |
| 0003 | Roky | M | 2011-04-21 | Mamifero | 3 | Boxer
| 7 mts |
| 0004 | Scam | M | 2001-07-11 | Reptil | 1 | Serpient
e | 7 mts |
| 0005 | Saltadora | F | 2013-01-17 | Anfibios | 2 | Rana
| 1 mts |
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
5 rows in set (0.00 sec)
mysql> select* from propietario;
+------+-----------+---------------+-------------+------------+------+
| id_p | Nombre_p | Prof_Oficio_p | Direccion_p | telefono_p | id_M |
+------+-----------+---------------+-------------+------------+------+
| 1000 | Ruben | Empleado | 0000-00-00 | 6563739115 | NULL |
| 1001 | Alejandra | Hogar | 0000-00-00 | 6562815698 | NULL |
| 1002 | Angel | Maestro | 0000-00-00 | 6562963587 | NULL |
| 1003 | Angelica | Maestra | 0000-00-00 | 6563659874 | NULL |
+------+-----------+---------------+-------------+------------+------+
4 rows in set (0.00 sec)
mysql> insert into propietario values ('1004','Alfredo','Maestro','0','614405395
4','1');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into propietario values ('1004','Uziel','Deportista','1','65640539
54','2');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into propietario values ('1004','Denisse','Masajista','2','6562669
265','3');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> select* from propietario;
+------+-----------+---------------+-------------+------------+------+
| id_p | Nombre_p | Prof_Oficio_p | Direccion_p | telefono_p | id_M |
+------+-----------+---------------+-------------+------------+------+
| 1000 | Ruben | Empleado | 0000-00-00 | 6563739115 | NULL |
| 1001 | Alejandra | Hogar | 0000-00-00 | 6562815698 | NULL |
| 1002 | Angel | Maestro | 0000-00-00 | 6562963587 | NULL |
| 1003 | Angelica | Maestra | 0000-00-00 | 6563659874 | NULL |
| 1004 | Alfredo | Maestro | 0000-00-00 | 6144053954 | 1 |
| 1004 | Uziel | Deportista | 0000-00-00 | 6564053954 | 2 |
| 1004 | Denisse | Masajista | 0000-00-00 | 6562669265 | 3 |
+------+-----------+---------------+-------------+------------+------+
7 rows in set (0.00 sec)
mysql> select* from mascota;
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
| id_M | Nombre_M | Sexo_M | FechaNacimientos_M | Especie_M | peso_M | Raza_M
| Alzada_M |
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
| 0001 | Cosita | f | 2010-02-28 | Mamifero | 4 | pudul
| 10 mts |
| 0002 | Shastar | M | 2010-05-20 | Mamifero | 4 | Husky
| 3 mts |
| 0003 | Roky | M | 2011-04-21 | Mamifero | 3 | Boxer
| 7 mts |
| 0004 | Scam | M | 2001-07-11 | Reptil | 1 | Serpient
e | 7 mts |
| 0005 | Saltadora | F | 2013-01-17 | Anfibios | 2 | Rana
| 1 mts |
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
5 rows in set (0.00 sec)
mysql> insert into mascota values ('0006','','Masajista','2','6562669265','3');
ERROR 1136 (21S01): Column count doesn't match value count at row 1
mysql> insert into mascota values ('0006','Peny','M','2013-02-28','Mamifero','3'
,'Beagle','1');
Query OK, 1 row affected (0.00 sec)
mysql> insert into mascota values ('0007','Muñeca','F','2011-05-25','Mamifero','
1','boxer','3');
Query OK, 1 row affected (0.00 sec)
mysql> decribe mascota;
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 'decri
be mascota' at line 1
mysql> select* from mascota;
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
| id_M | Nombre_M | Sexo_M | FechaNacimientos_M | Especie_M | peso_M | Raza_M
| Alzada_M |
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
| 0001 | Cosita | f | 2010-02-28 | Mamifero | 4 | pudul
| 10 mts |
| 0002 | Shastar | M | 2010-05-20 | Mamifero | 4 | Husky
| 3 mts |
| 0003 | Roky | M | 2011-04-21 | Mamifero | 3 | Boxer
| 7 mts |
| 0004 | Scam | M | 2001-07-11 | Reptil | 1 | Serpient
e | 7 mts |
| 0005 | Saltadora | F | 2013-01-17 | Anfibios | 2 | Rana
| 1 mts |
| 0006 | Peny | M | 2013-02-28 | Mamifero | 3 | Beagle
| 1 |
| 0007 | Muñeca | F | 2011-05-25 | Mamifero | 1 | boxer
| 3 |
+------+-----------+--------+--------------------+-----------+--------+---------
--+----------+
7 rows in set (0.00 sec)
mysql> create table Consulta (num_consulta, motivo);
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 ' moti
vo)' at line 1
mysql> create table Consulta (num_consulta, motivo);
No hay comentarios:
Publicar un comentario