2012-02-20 31 views

回答

1

你會發現手冊中的答案:

http://h2database.com/html/functions.html#current_timestamp

在Java

Statement stmt = connection.createStatement(); 
ResultSet rs = stmt.executeQuery("select current_timestamp() from dual"); 
rs.next(); 
Timestamp ts = rs.getTimestamp(1); 
rs.close(); 
stmt.close(); 
+0

我已經搜查,我發現CURRENT_DATE(),但問題是,我不知道表「雙」,所以我問了一個普遍的態度,所以你更清楚地理解我的問題...... – 2012-02-20 12:46:36

+0

@MarwenTrabelsi:好的,我不確定,實際上,問題是什麼。所以真正的問題是關於JDBC,以及如何處理H2這樣的查詢... – 2012-02-20 12:50:43

相關問題