Oracle: SQL select date with timestamp

前端 未结 2 561
[愿得一人]
[愿得一人] 2021-02-06 13:31

I have the following data:

SQL> select * from booking_session;

BK_ID|BK_DATE
-----|-------------------------
    1|18-MAR-12 10.00.00.000000
    2|18-MAR-12          


        
2条回答
  •  渐次进展
    2021-02-06 14:36

    Answer provided by Nicholas Krasnov

    SELECT *
    FROM BOOKING_SESSION
    WHERE TO_CHAR(T_SESSION_DATETIME, 'DD-MM-YYYY') ='20-03-2012';
    

提交回复
热议问题