Intorduccion al sql

Solo disponible en BuenasTareas
  • Páginas : 3 (670 palabras )
  • Descarga(s) : 0
  • Publicado : 18 de enero de 2011
Leer documento completo
Vista previa del texto
Enter password: ***
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.4.3-beta-community MySQL Community Server (GPL)

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

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql|
| test |
+--------------------+
3 rows in set (0.00 sec)

mysql> create database contactos;
Query OK, 1 row affected (0.00 sec)

mysql> show tables;
ERROR 1046 (3D000):No database selected
mysql> show table;
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'' at
line 1
mysql> show tables;
ERROR 1046 (3D000): No database selected
mysql> use contactos;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> cretae table contactos-> (idcontacto int,
-> nombre varchar(20),
-> apellido varchar(20),
-> direccion varchar(30),
-> ciudad varchar(15),
-> pais varchar(15),
-> nombrecompania varchar(30),-> cargo varchar(20),
-> telefonotrabajo char (8),
-> telefonomovil char (8),
-> correoelectronico varchar (30),
-> idtipocontacto int);
ERROR 1064 (42000): You have an errorin your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'creta
e table contactos
(idcontacto int,
nombre varchar(20),
apellidovarchar(20)' at line 1
mysql> create table contactos
-> (idcontacto int,
-> nombre varchar(20),
-> apellido varchar(20),
-> direccion varchar(30),
-> ciudad varchar(15),
->pais varchar(15),
-> nombrecompania varchar(30),
-> cargo varchar(20),
-> telefonotrabajo char (8),
-> telefonomovil char (8),
-> correoelectronico varchar (30),
->...
tracking img