- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to apply EXTRACT() function with WHERE Clause on the dates stored in MySQL table?
With the help of following MySQL query, we can apply EXTRACT() function with WHERE clause on the dates stored in a table.
mysql> Select StudentName,EXTRACT(Year from dateofreg)AS YEAR from testing WHERE StudentName = 'Gaurav'; +-------------+------+ | StudentName | YEAR | +-------------+------+ | Gaurav | 2017 | +-------------+------+ 1 row in set (0.00 sec)
Advertisements