how to insert only time in hh:mi in oracle and how to run select query by comparing time.
Explanation:
Let consider a doctor visit in hospital daily from 9AM to 11AM and 6PM to 8PM.
SO when we run a select query to search doctors who visit at 10AM on particular day.
Please give explanation with code.
Thanks in advance.
You just need basic date arithmetic, and the plain old date type.
I presume you want to find doctors who were in the hospital at 10:00am, as opposed to doctors who visited exactly at 10AM
I haven’t considered the use case where in_time and out_time fall on different dates, i.e. say 11:00PM in and 2:00 am out.
OR IF you want to find a list of Doctors who visited the hospital exactly at 10:00AM then
But that would be a very strange thing to query, as you really can’t be sure if some one visits exactly at that specific time.