Skip to content

SQL Query ORDER BY column values

I have a column which can take any values from 0 to 100. Now i have a type TYPE1 which can take values 2, 4, 16 TYPE2 which can take values 8,12,64. Now i want to sort the column by TYPE1 values first and then TYPE2 values. Is there any way to do that. My column has only these values.

How to select several hardcoded SQL rows?

If you execute this query SELECT ‘test-a1’ AS name1, ‘test-a2’ AS name2 the result will be a one row-selection with two columns having these values: test-a1, test-a2 How can I modify the above …