PostgreSQL: IN A SINGLE SQL SYNTAX order by numeric value computed from a text column
问题 A column has a string values like "1/200", "3.5" or "6". How can I convert this String to numeric value in single SQL query? My actual SQL is more complicated, here is a simple example: SELECT number_value_in_string FROM table number_value_in_string's format will be one of: ## #.## #/### I need to sort by the numeric value of this column. But of course postgres doesn't agree with me that 1/200 is a proper number. 回答1: Seeing your name I cannot but post a simplification of your answer: SELECT