martes, 19 de marzo de 2013
actividad 18
Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.
C:\Users\JonnyNaz4>cd..
C:\Users>cd
C:\Users
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;
Database changed
mysql> show tables
-> ;
+-----------------------+
| Tables_in_veterinaria |
+-----------------------+
| caracesp |
| consulta |
| datosmedamb |
| histmedica |
| lesiones |
| mascota |
| propietario |
| sistemadigestivo |
| sistemanervioso |
| sistemarespiratorio |
+-----------------------+
10 rows in set (0.15 sec)
mysql> select*from propietario;
Empty set (0.04 sec)
mysql> describe propietario;
+-----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------+-------+
| nombreP | varchar(15) | NO | PRI | NULL | |
| direccion | varchar(30) | YES | | NULL | |
| telefono | int(15) | YES | | NULL | |
| PuO | varchar(20) | YES | | NULL | |
+-----------+-------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
mysql> insert into propietario values('jonathan','fracc del real',6561449688','n
o se que es');
'> ;
'> ;
'> ;;
'> ';
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 '','no
se que es');
;
;
;;
'' at line 1
mysql> insert into propietario values('jonathan','fracc del real',6561449688,'no
se que es');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> select * from propietario;
+----------+----------------+------------+--------------+
| nombreP | direccion | telefono | PuO |
+----------+----------------+------------+--------------+
| jonathan | fracc del real | 2147483647 | no se que es |
+----------+----------------+------------+--------------+
1 row in set (0.00 sec)
mysql> insert into propietario values('jonathan','fracc del real','6561449688','
no se que es');
ERROR 1062 (23000): Duplicate entry 'jonathan' for key 'PRIMARY'
mysql> alter table propietario delete jonathan;
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 'delet
e jonathan' at line 1
mysql> alter table propietario drope jonathan;
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 'drope
jonathan' at line 1
mysql> alter table propietario drop jonathan;
ERROR 1091 (42000): Can't DROP 'jonathan'; check that column/key exists
mysql> alter table propietario drop jonathan;
ERROR 1091 (42000): Can't DROP 'jonathan'; check that column/key exists
mysql> delete from propietario;
Query OK, 1 row affected (0.00 sec)
mysql> insert into propietario values('jonathan','fracc del real','6561449688','
no se que es');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> select*from propietario;
+----------+----------------+------------+--------------+
| nombreP | direccion | telefono | PuO |
+----------+----------------+------------+--------------+
| jonathan | fracc del real | 2147483647 | no se que es |
+----------+----------------+------------+--------------+
1 row in set (0.00 sec)
mysql> insert into propietario values('isai','mexico 68','656646438','sigo sin s
aber que es');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> select*from propietario;
+----------+----------------+------------+----------------------+
| nombreP | direccion | telefono | PuO |
+----------+----------------+------------+----------------------+
| jonathan | fracc del real | 2147483647 | no se que es |
| isai | mexico 68 | 656646438 | sigo sin saber que e |
+----------+----------------+------------+----------------------+
2 rows in set (0.00 sec)
mysql> describe consulta;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| numConsulta | int(11) | NO | PRI | NULL | |
| motivo | varchar(50) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
2 rows in set (0.07 sec)
mysql> insert into consulta values(001,'rabia');
Query OK, 1 row affected (0.00 sec)
mysql> insert into consulta values(002,'vacuna');
Query OK, 1 row affected (0.00 sec)
mysql> select * from consulta;
+-------------+--------+
| numConsulta | motivo |
+-------------+--------+
| 1 | rabia |
| 2 | vacuna |
+-------------+--------+
2 rows in set (0.00 sec)
mysql>
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario