BBampaa

Lessons › SQL › Deep Dive: Text, Date & Number Functions

SQL lesson

CURRENT_DATE for today's date

CURRENT_DATE returns today's date automatically, so every row gets the same stamp without you typing it in manually.

Try this lesson free →
About 5–10 minutes · no sign-up needed

Example

Stamping rows with today's date

SELECT *, CURRENT_DATE AS today FROM customers

Result:

customer_idnamecitytoday
C001Alex ParkToronto2026-05-14
C002Jordan LeeVancouver2026-05-14
C003Sam RiveraCalgary2026-05-14

Step by step

  1. AS gives a column a friendlier name in the result.
    SELECT *, CURRENT_DATE AS today
  2. FROM tells SQL which table to pull the data from.
    SELECT *, CURRENT_DATE AS today
    FROM customers;

Practice

Try each one in your head first, then open the answer.

1. Write a query on the orders table that adds a column called today set to today's date on every row.
SELECT *, CURRENT_DATE AS today FROM orders
2. Write a query on the shipments table that adds a column called today set to today's date on every row.
SELECT *, CURRENT_DATE AS today FROM shipments
3. Write a query on the promotions table that adds a column called today set to today's date on every row.
SELECT *, CURRENT_DATE AS today FROM promotions
4. Write a query on the store_sales table that adds a column called today set to today's date on every row.
SELECT *, CURRENT_DATE AS today FROM store_sales
5. Write a query on the returns table that adds a column called today set to today's date on every row.
SELECT *, CURRENT_DATE AS today FROM returns

Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.

Try this lesson free →
About 5–10 minutes · no sign-up needed