jueves, 15 de mayo de 2014

PRACTICA 2


PRATICA 2

Enter password: ***

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 4

Server version: 5.0.51b-community-nt-log MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use biblioteca;

Database changed

mysql> drop table borrar;

Query OK, 0 rows affected (0.00 sec)

mysql> alter table libro add ano_de_edicion date;

Query OK, 0 rows affected (0.06 sec)

Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table usuario drop column direccion;

Query OK, 0 rows affected (0.09 sec)

Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table usuario add calle varchar(15);

Query OK, 0 rows affected (0.08 sec)

Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table usuario add numero integer;

Query OK, 0 rows affected (0.08 sec)

Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table usuario add colonia varchar(15);

Query OK, 0 rows affected (0.06 sec)

Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table usuario add ciudad varchar(15);

Query OK, 0 rows affected (0.07 sec)

Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table usuario add codigo_postal integer;

Query OK, 0 rows affected (0.17 sec)

Records: 0  Duplicates: 0  Warnings: 0

 

mysql> show columns from usuario;

+---------------+-------------+------+-----+---------+-------+

| Field         | Type        | Null | Key | Default | Extra |

+---------------+-------------+------+-----+---------+-------+

| codigo        | int(11)     | NO   | PRI | NULL    |       |

| nombre        | varchar(10) | YES  |     | NULL    |       |

| telefono      | int(11)     | YES  |     | NULL    |       |

| calle         | varchar(15) | YES  |     | NULL    |       |

| numero        | int(11)     | YES  |     | NULL    |       |

| colonia       | varchar(15) | YES  |     | NULL    |       |

| ciudad        | varchar(15) | YES  |     | NULL    |       |

| codigo_postal | int(11)     | YES  |     | NULL    |       |

+---------------+-------------+------+-----+---------+-------+

8 rows in set (0.02 sec)

 

No hay comentarios.:

Publicar un comentario