In PostgreSQL you can do:
SELECT * FROM Requirements
ORDER BY string_to_array(version, '.')::int[];
This last ::int[]
makes it convert string values into integers and then compare as such.
More Related Contents:
- Syntax not valid on word ‘ON’ in SQL join statement [closed]
- Select first row in each GROUP BY group?
- Optimal way to concatenate/aggregate strings
- What is an index in SQL?
- Doing a WHERE .. IN subquery in Doctrine 2
- Escaping keyword-like column names in Postgres
- SQL left join vs multiple tables on FROM line?
- TSQL Pivot without aggregate function
- Delete duplicate rows (don’t delete all duplicate)
- Why are there gaps in my IDENTITY column values?
- What is the reason not to use select *?
- GROUP BY + CASE statement
- Return a value if no record is found
- How do I return rows with a specific value first?
- How to count occurrences of a column value efficiently in SQL?
- Perform this hours of operation query in PostgreSQL
- Does the JDBC spec prevent ‘?’ from being used as an operator (outside of quotes)?
- Search for “whole word match” with SQL Server LIKE pattern
- How to use an ALIAS in a PostgreSQL ORDER BY clause?
- How to get N rows starting from row M from sorted table in T-SQL
- Is there a difference between Select * and Select [list each col] [duplicate]
- How can I generate a temporary table filled with dates in SQL Server 2000?
- Why are logical reads for windowed aggregate functions so high?
- Is SQL or even TSQL Turing Complete?
- MySQL’s alternative to T-SQL’s WITH TIES
- SQL SELECT from multiple tables
- Can select * usage ever be justified?
- Finding rows that don’t contain numeric data in Oracle
- The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions
- What is the meaning of SELECT … FOR XML PATH(‘ ‘),1,1)?