I have a Database which is dealing with a book library system. I have a table which has a has a field dealing with the ReturnDate of a book. I was wondering if it is possible to do a SELECT statement that would return the the fines due on an overdrawn book at the database level instead of me having to do it in a Java environment.
In words what I want done:
IF (ReturnDate > CURDATE())
(ReturnDate - CURDATE()) * Fine
Thanks in advance