SQL NOW() Function

The NOW() Function

The NOW() work restores the present framework date and time.

SQL NOW() Syntax

SELECT NOW() FROM table_name;


In this instructional exercise we will utilize the notable Northwind test database.

Below is a choice from the "Products" table:

ProductID ProductName SupplierID CategoryID Unit Price
1 Whey Protein 1 1 350g ₨ 1637
2 Optimum Nutrition Serious Mass Weight Gainers 1 1 500g ₨ 2728
3 Ultimate Nutrition Prostar 100% Whey Protein 1 2 400g ₨ 3549
4 Optimum Nutrition Serious Mass Weight Gainers 2 2 1kg ₨ 4460
5 Ultimate Nutrition 100% Microniszed Creatine 2 2 200g ₨ 553

SQL NOW() Example

The following SQL articulation chooses the item name, and cost for now from the "Products" table:


SELECT ProductName, Price, Now() AS PerDate
FROM Products;