- Trending Categories
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)
- Related Articles
- How to apply EXTRACT() function on the dates stored in MySQL table?
- How can MySQL REPLACE() function be used with WHERE clause?
- How can we use ASCII() function with MySQL WHERE clause?
- How can we use CHAR_LENGTH() function with MySQL WHERE clause?
- How can we use BIN() function with MySQL WHERE clause?
- How can CONCAT() function be used with MySQL WHERE clause?
- How can CONCAT_WS() function be used with MySQL WHERE clause?
- How can we use FIND_IN_SET() function with MySQL WHERE clause?
- How LOCATE() function can be used with MySQL WHERE clause?
- How can we use MySQL INSTR() function with WHERE clause?
- How can I use SPACE() function with MySQL WHERE clause?
- How can we use MySQL REVERSE() function on column’s data along with WHERE clause?
- How to use MySQL VIEW with WHERE clause?
- How can I convert the epoch stored in MySQL table into readable dates?
- How to use MySQL Date functions with WHERE clause?

Advertisements