SQL like search string starts with

后端 未结 4 568
失恋的感觉
失恋的感觉 2020-12-29 17:52

Learning SQL. Have a simple table games with field title. I want to search based on title. If I have a game called Age of Empires III: Dynasties, and I use

4条回答
  •  失恋的感觉
    2020-12-29 18:08

    Aside from using %, age of empires III to lower case is age of empires iii so your query should be:

    select *
    from games
    where lower(title) like 'age of empires iii%'
    

提交回复
热议问题