Categories

Saturday, April 20, 2024
#919814419350 therichposts@gmail.com
MysqlPhp

Important Mysql date, concat queries

Important Mysql date, concat queries

Hello to all, welcome to therichpost.com. In this post, I will tell you Important Mysql date, concat queries. MySQL is an open source relational database management system.

Here are the some Important Mysql date, concat queries:

1. Mysql concat two columns in single column:

SELECT id, CONCAT(firstName, ‘-‘, phone) AS FIRSTNAME FROM `users` ORDER BY FIRSTNAME ASC

2. Mysql data with current date:

SELECT * FROM users WHERE startDateTime = CURDATE()

3. Mysql data with last week:

SELECT * FROM users WHERE startDateTime BETWEEN DATE_SUB(CURDATE(),INTERVAL 1 WEEk) AND CURDATE()

4. Mysql data with last Month:

SELECT * FROM user WHERE startDateTime BETWEEN DATE_SUB(CURDATE(),INTERVAL 1 MONTH) AND CURDATE()

5. Mysql data with Future data:

SELECT * FROM user startDateTime > CURDATE()

There are so many queries in Mysql and I will let you know all. Please do comment if you any query related to this post. Thank you. Therichpost.com

therichpost
the authortherichpost
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 14, Angular 15, Angular 16, Angular 17, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.