Skip to content
Advertisement

Why current_date() incurr errors in postgres sql

I have sql like following.

But it returned following errors

Syntax error at or near Line 19, Position 35

This error was caused by current_date(). How can I avoid this and how can I get current date ?

If someone has opinion,please let me know

Thanks

Advertisement

Answer

date_sub() function is only available in Mysql , and current_date in postgresql is not a function.

here is the correct postgresql syntax:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement