search

Home  >  Q&A  >  body text

How to match characters in SQL regardless of character order?

For example, I have a table

------------------------------------------------ -----------

id | name

1 | abcde

2 | bcdef

##3 | cdefg

--------------------------------------------------

Then the string I get now may be bcd or CBD. I need to find two pieces of data with IDs 1 and 2 based on these two characters. How should I write a sql regular statement? Thank you teacher for teaching

NULLNULL2193 days ago1021

reply all(2)I'll reply

  • 韦小宝

    韦小宝2019-01-05 10:58:48

    If you want to query the ID based on the name that is not written in full, you can use wildcards to achieve it

    reply
    0
  • Cancelreply