select * from table
从table表中查询所有数据,按照 属性isable ==可用的排在前面,
isable==不可用排在后面,该怎么实现?
SELECT * FROM table
WHERE isable
= 1 ORDER BY isable
ASC
或
SELECT * FROM table
WHERE isable
= 1 ORDER BY isable
DESC
或
SELECT * FROM table
WHERE isable
= 1 ORDER BY isable
ASC UNIQUE SELECT * FROM table
WHERE isable
= 1 ORDER BY isable
DESC
select * from table order by isable asc或desc
使用order by 实现数据的排序