Solution about WHERE IN Sort

xiaoxiao2021-04-08  371

The result of select * from Talbe where ID in (3, 2, 4, 1) is: 1234

How can I output 3241?

Solution is

Select * from Talbe WHERE ID in (3, 2, 4, 1) Order by Find_IN_SET (ID, '3, 2, 4, 1')

转载请注明原文地址:https://www.9cbs.com/read-132727.html

New Post(0)