You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by 落叶风中舞 <ba...@qq.com> on 2011/01/25 07:32:31 UTC

Help, a simple question!

hello:
      How to get database time use sql clause in Derby?
  ------------------

Re: Help, a simple question!

Posted by Knut Anders Hatlen <kn...@oracle.com>.
"落叶风中舞" <ba...@qq.com> writes:

> hello:
>      How to get database time use sql clause in Derby?

Hi,

You can use the functions CURRENT_TIME, CURRENT_DATE or
CURRENT_TIMESTAMP to get the time using SQL. For example:

ij> values current_time;
1       
--------
23:59:52

1 row selected
ij> values current_timestamp;
1                            
-----------------------------
2011-01-25 23:59:55.525      

1 row selected
ij> values current_date;
1         
----------
2011-01-26

1 row selected


-- 
Knut Anders