
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
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 Articles
- MySQL query to select records with a particular date?
- MySQL query to select records with a particular date and time?
- Display matching repeated date records only once in MySQL
- Find date record after a particular date from a column with VARCHAR type 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?
- How to display coming Sunday's date for all the date records in MySQL?
- Display month names and year from a column with date records with MySQL
- MySQL query to subtract date records with week day and display the weekday with records
- Find records on or after a specific date in MongoDB?
- MySQL query to fetch date records greater than the current date after adding days with INTERVAL?
- Display records from the current date till rest of the same month in MySQL?
- Display records ignoring NULL in MySQL
- Display IDs in a particular order with MySQL IN()?

Advertisements