GETDATE function is used to get the current date and time. This function is used when querying a Microsoft SQL Server. For MySQL Server, you can use the
SELECT GETDATE() as [Current Date and Time]
Aside from querying for the current date and time, you could use this function in the configuration of a table so that the current date and time are used when null values are passed.
You can also use this function in an
INSERT INTO statement as well. There are many different ways to use this function.