How to reorder row in SELECT query in MYSQL? -


a categories table contains id, category_name,category_type etc.

i getting records select query.

suppose have category name shared article , want first position in records.

of course using simple query

 select `category_name`,`category_type`,`categories`.`id`,  count(`user_bookmarks`.`id`) counter `categories`  left join `user_bookmarks`   on `categories`.`id`=`user_bookmarks`.`category_id`  `categories`.`user_id`=39 group `categories`.`category_name`  

but don't know how achieve task?

is possible mysql?

yes can as

order  `categories`.`category_name` = 'shared article' desc 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -