Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/09/2010, 08:41
albertpg
 
Fecha de Ingreso: enero-2005
Mensajes: 170
Antigüedad: 19 años, 3 meses
Puntos: 0
Dos columnas TIMESTAMP a la vez?

Buenas! He exportado esto de un Access:

Código MySQL:
Ver original
  1. CREATE TABLE `representacionsdates` (
  2.   `id_representaciodata` INTEGER NOT NULL AUTO_INCREMENT,
  3.   `clau_representacio` INTEGER NOT NULL DEFAULT 0,
  4.   `data_representacio` DATETIME NOT NULL DEFAULT '=Now()',
  5.   `datareg` DATETIME DEFAULT '=Now()',
  6.   INDEX (`id_representaciodata`),
  7.   PRIMARY KEY (`id_representaciodata`)
  8. ) ENGINE=myisam DEFAULT CHARSET=utf8;

Y lo he traducido por:

Código MySQL:
Ver original
  1. CREATE TABLE `representacionsdates` (
  2.   `id_representaciodata` INTEGER NOT NULL AUTO_INCREMENT,
  3.   `clau_representacio` INTEGER NOT NULL DEFAULT 0,
  4.   `data_representacio` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  5.   INDEX (`id_representaciodata`),
  6.   PRIMARY KEY (`id_representaciodata`)
  7. ) ENGINE=myisam DEFAULT CHARSET=utf8;

Pero no puedo tener dos TIMESTAMP a la vez. Como lo soluciono? gracias