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
Recent Comments