Ver Mensaje Individual
  #4 (permalink)  
Antiguo 08/03/2010, 18:32
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 3 meses
Puntos: 360
Respuesta: Tomar fecha del sistema con postgres

Código SQL:
Ver original
  1. pruebas=> CREATE TABLE prueba_fecha(id INTEGER,fecha TIMESTAMP DEFAULT now())
  2. CREATE TABLE
  3. pruebas=> INSERT INTO prueba_fecha (id) VALUES(1);
  4. INSERT 0 1
  5. pruebas=> INSERT INTO prueba_fecha (id) VALUES(2);
  6. INSERT 0 1
  7. pruebas=> INSERT INTO prueba_fecha (id) VALUES(3);
  8. INSERT 0 1
  9. pruebas=> SELECT *FROM prueba_fecha;
  10.  id |          fecha
  11. ----+-------------------------
  12.   1 | 2010-03-08 19:31:24.885
  13.   2 | 2010-03-08 19:31:27.575
  14.   3 | 2010-03-08 19:31:30.072
  15. (3 filas)


saludos
__________________
Without data, You are another person with an opinion.
W. Edwads Deming