Skip to content
Advertisement

How to make a SQL query partial match with substrings not in the beginning

Let’s say there is a column called: m_report_notation

Said column, has values such as: NM_004004.5:c.235del (p.L79Cfs*3)

And I would like that, if the value of v is, for example: 235del, then get NM_004004.5:c.235del (p.L79Cfs*3) as a result.

This is my current query and what I’ve tried so far (using MariaDB connector for Django):

If for example, v = NM_00 I will get a list of results starting with NM_00, but what if the substring that I’m introducing it’s not in the beginning? What if is something like “235del”?

Advertisement

Answer

Are you looking for like?

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement