2008年7月15日 星期二

Select record by time format

alter session set nls_date_format = 'yyyy/mm/dd hh24:mi:ss' <-- set the second shown by define format.

select * from epis_file where site_code = 'YT' and trunc(import_date) = to_date('2008/05/09');

trunc <--- limit the time not select.


or


select * from epis_file where site_code = 'YT' and trunc(import_date) = to_date('2008/05/09','yyyy-mm-dd');

沒有留言: