Today I come across with a complex sql query requirement where I have to filter a table on a column entry and then sort according to date. The SQL language have some inbuilt keywords like ORDER to sort out this type of issues.
Let use have below table for our practice purpose
For ascending order use below code
select * from table where column_name1='value1' order by table.column_name2 ASC
Example:
For descending order use below code
select * from table where column_name1='value1' order by table.column_name2 DESC
Example:
Latest posts by Surendra Anne (see all)
- Docker: How to copy files to/from docker container - June 30, 2020
- Anisble: ERROR! unexpected parameter type in action:
Fix - June 29, 2020 - FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018