de_notes

📚 EXTRACT

The EXTRACT function is used in SQL to retrieve specific parts of a date or time value, such as the year, month, or day.
It is useful for breaking down timestamps for reporting or filtering.


🛠️ Basic Syntax

SELECT EXTRACT(part FROM date_column)
FROM table_name;

Example

SELECT EXTRACT(YEAR FROM hire_date) AS hire_year
FROM employees;

Key Points

Additional Example

SELECT EXTRACT(MONTH FROM order_date) AS order_month
FROM orders;

🎥 Video Notes


📝 Problem Description

Describe the problem, challenge, or topic discussed in a video related to SELECT FROM.
What concept was explained or what exercise was solved?


DataBase Given


💻 My SQL Code

-- Write your SQL code attempt or solution related to SQL COMMAND
SQL COMMAND

🧠 Solution Code / Explanation

SQL COMMAND

Explanation - Explain what you learned, any key takeaways, or how you solved the problem related to COMMAND._


⬅️ Previous: UPPER & LOWER Next ➡️ COALESCE