Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql order by except one row

SELECT name
FROM categories
ORDER
    BY CASE WHEN name = 'Other'
            THEN 1 -- last
            ELSE 0 -- first
        END ASC
     , name ASC
Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #sql #order #row
ADD COMMENT
Topic
Name
8+3 =