how to display employee names starting with a and then b in sql

前端 未结 12 1626
谎友^
谎友^ 2021-02-05 19:58

i want to display the employee names which having names start with a and b ,it should be like list will display employees with \'a\' as a first letter and then the \'b\' as a

12条回答
  •  梦如初夏
    2021-02-05 20:44

    What cfengineers said, except it sounds like you will want to sort it as well.

    select columns
      from table
     where (
             column like 'a%' 
          or column like 'b%' )
    order by column
    

    Perhaps it would be a good idea for you to check out some tutorials on SQL, it's pretty interesting.

提交回复
热议问题