martes, 4 de septiembre de 2012
C:\Archivos de programa\MySQL\MySQL Server 5.5\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.5.27 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 trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use biblioteca;
Database changed
mysql> show tables;
+----------------------+
| Tables_in_biblioteca |
+----------------------+
| categoria |
| libro |
| usuario |
+----------------------+
3 rows in set (0.00 sec)
mysql> select * from categoria;
+-----------------+-----------------+
| codigocategoria | nombrecategoria |
+-----------------+-----------------+
| 0 | Suspenso |
| 1 | ciencia ficcion |
| 2 | infantiles |
| 3 | terror |
+-----------------+-----------------+
4 rows in set (0.00 sec)
mysql> select * from libro;
+-------------+----------+-------------------+---------+------+
| codigolibro | titulo | autor | edicion | isbn |
+-------------+----------+-------------------+---------+------+
| 0 | Librisin | Ramon Perez | 4ta | 5241 |
| 1 | Viajes | Marina Lopez | 1ra | 9720 |
| 2 | Ciencia | Rupertin Arriaga | 5ta | 5011 |
| 3 | Martires | Ramiro Buenavista | 3era | 8941 |
+-------------+----------+-------------------+---------+------+
4 rows in set (0.00 sec)
mysql> select * from usuario;
+----+------------------+-----------------------+----------+------------+
| id | nombre | direccion | telefono | contrasena |
+----+------------------+-----------------------+----------+------------+
| 0 | Marcelo Herrera | Burma 5014 | 6345178 | kndn |
| 1 | Francisca Rubio | Chalapa 8741 | 6419485 | jmsmf |
| 2 | Cleodoro Pinto | Rincon del valle 5044 | 3405513 | poedc |
| 3 | Sostenes Ituarte | Oxigeno 7511 | 1905761 | kjcmo |
+----+------------------+-----------------------+----------+------------+
4 rows in set (0.02 sec)
mysql> describe libro;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| codigolibro | int(11) | NO | PRI | NULL | |
| titulo | varchar(30) | YES | | NULL | |
| autor | varchar(30) | YES | | NULL | |
| edicion | varchar(30) | YES | | NULL | |
| isbn | int(11) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
mysql> describe categoria;
+-----------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+-------------+------+-----+---------+-------+
| codigocategoria | int(11) | NO | PRI | NULL | |
| nombrecategoria | varchar(30) | YES | | NULL | |
+-----------------+-------------+------+-----+---------+-------+
2 rows in set (0.01 sec)
mysql> describe usuario;
+------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| id | int(11) | NO | PRI | NULL | |
| nombre | varchar(30) | YES | | NULL | |
| direccion | varchar(30) | YES | | NULL | |
| telefono | int(11) | YES | | NULL | |
| contrasena | varchar(30) | YES | | NULL | |
+------------+-------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
mysql>
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario