mysql alphabetical order

前端 未结 8 1541
臣服心动
臣服心动 2021-02-04 05:34

i am trying to sort mysql data with alphabeticaly like

A | B | C | D

when i click on B this query runs

select name from user order by \

8条回答
  •  时光取名叫无心
    2021-02-04 06:07

    If you want to restrict the rows that are returned by a query, you need to use a WHERE clause, rather than an ORDER BY clause. Try

    select name from user where name like 'b%'
    

提交回复
热议问题