2013-02-08 13 views

Odpowiedz

17

użycie CURRENT_TIMESTAMP

select * from tableName where date_column > CURRENT_TIMESTAMP() 
+0

W h2 my select now() nie działa, ale w aktualizacji tbl zestaw col = now() działa. Jak to pasuje do siebie? Również oni teraz() jako alternatywę dla current_timestamp na http://www.h2database.com/html/functions.html#current_timestamp – tObi

9

jeśli chcesz porównać z obecnym terminie tylko wtedy użyć

select * from tableName where date_column > CURRENT_DATE() 

jeśli chcesz porównać z aktualna data i godzina także

select * from tableName where date_column > CURRENT_TIMESTAMP 
Powiązane problemy