Basic SQL Topics
GETDATE()
If we’d like to get the current date, we can use the GETDATE() function (note most commonly used in SQL SERVER, it’s not available in all versions of SQL):
The GETDATE() function is useful to get today’s date in SQL. If you have a SQL query you run everyday, and you only want data from the database table with data from today, you can use the GETDATE() function to always return the current day’s data. See the next lesson for more details how to do this.