postgres view showing todays orders
Is there a variable built into postgres to represent "today"? I want create a view of a table that only shows data that was entered "today" there is a datetime field that represents t开发者_如何学编程he date / time an order was entered.
select * from table where date("created_date") = current_date();
There is CURRENT_DATE
SELECT CURRENT_DATE;
See Date/Time Functions
精彩评论