Ver Mensaje Individual
  #1  
Antiguo 14-01-2008
Avatar de jorgegetafe
jorgegetafe jorgegetafe is offline
Miembro
 
Registrado: dic 2006
Posts: 238
Reputación: 18
jorgegetafe Va por buen camino
Error script creacion base de datos

Estoy creando el script de una base de datos, cuando importo a mysql me da errores de sintaxis, a ver si me podeis ayudar a corregirlos, gracias:


Código SQL [-]
/*
Created: 13/01/2008
Modified: 14/01/2008
Model: MySQL 5.0
Database: MySQL 5.0
*/
-- Drop tables section ---------------------------------------------------
drop table if exists `PERSONA`;
-- Create tables section -------------------------------------------------
-- Table PERSONA
CREATE TABLE `PERSONA`
(
  `Nombre` Char(20),
  `Apellido1` Char(20),
  `Apellido2` Char(20),
  `DNI` Char(9),
  `FechaNacimiento` Date,
  `Direccion` Char(50),
  `Ciudad` Char(20),
  `Provincia` Char(20) DEFAULT 'Madrid',
  `Movil` Char(9),
  `Fax` Char(10),
  `Correo` Char(40),
  `CorreoTrabajo` Char(40) DEFAULT,
  `TelefonoTrabajo` Char(20),
  `Sexo` Enum('Hombre','Mujer') NOT NULL,
  `NumeroHijos` Enum('0','1','2','3','4','5','6','7','8','9','10') DEFAULT '0',
  `Comentario` Char(200),
  `Apodo` Char(20),
  `PaginaWeb` Char(40),
  `CodigoPostal` Char(5),
  `Pais` Char(20) DEFAULT 'España',
  `Codigo` Char(5) NOT NULL AUTO_INCREMENT,
  `TipoContacto` Enum('Amig@', 'Familiar', 'Trabajo', 'Otro', 'Estudios', 'Cliente', 'Proveedor') NOT NULL,
  `Telefono` Char(10),
  `Telefono2` Char(10),
  `DireccionTrabajo` Char(50),
  `Direccion2` Char(50),
  `NumeroHermanos` Enum('0','1','2','3','4','5','6','7','8','9','10') DEFAULT '0',
  `Movil2` Char(9),
  `Zodiaco` Enum('Aries','Tauro','Géminis','Cáncer','Leo','Virgo','Libra','Escorpio','Sagitario','Capricornio','  Acuario','Piscis')
);
ALTER TABLE `PERSONA` ADD PRIMARY KEY  (`Codigo`);
__________________
Explicate como si fuese tonto, soy nuevo en esto de hacer programas!!!! XD
Responder Con Cita