

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Display records after a particular date in MySQL
Let us first create a table −
mysql> create table DemoTable708 ( CustomerName varchar(100), ShippingDate date ); Query OK, 0 rows affected (0.51 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable708 values('John','2019-01-21'); Query OK, 1 row affected (0.20 sec) mysql> insert into DemoTable708 values('Chris','2019-03-24'); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable708 values('Robert','2019-04-26'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable708 values('David','2019-07-22'); Query OK, 1 row affected (0.17 sec)
Display all records from the table using select statement −
mysql> select *from DemoTable708;
This will produce the following output -
+--------------+--------------+ | CustomerName | ShippingDate | +--------------+--------------+ | John | 2019-01-21 | | Chris | 2019-03-24 | | Robert | 2019-04-26 | | David | 2019-07-22 | +--------------+--------------+ 4 rows in set (0.00 sec)
Following is the query to display records after a particular date in MySQL −
mysql> select *from DemoTable708 where ShippingDate >='2019-04-01';
This will produce the following output -
+--------------+--------------+ | CustomerName | ShippingDate | +--------------+--------------+ | Robert | 2019-04-26 | | David | 2019-07-22 | +--------------+--------------+ 2 rows in set (0.00 sec)
- Related Questions & Answers
- MySQL query to select records with a particular date?
- MySQL query to select records with a particular date and time?
- Find date record after a particular date from a column with VARCHAR type in MySQL
- Display matching repeated date records only once in MySQL
- Display distinct dates in MySQL from a column with date records
- Display all records ignoring the current date record in MySQL
- UNIX_TIMESTAMP with date in MySQL query to fetch records after a specific date in different format?
- Find records on or after a specific date in MongoDB?
- Display month names and year from a column with date records with MySQL
- How to display coming Sunday's date for all the date records in MySQL?
- MySQL query to subtract date records with week day and display the weekday with records
- MySQL query to fetch date records greater than the current date after adding days with INTERVAL?
- Display IDs in a particular order with MySQL IN()?
- Fetch ordered records after a specific limit in MySQL
- Display records ignoring NULL in MySQL
Advertisements