A
A
Andrey Surzhikov2019-03-07 17:34:24
PostgreSQL
Andrey Surzhikov, 2019-03-07 17:34:24

How to find fields in the database by the pattern "vice versa"?

There is a column in the database, it has values:

____________________
|_____template_____|
|  mri_head_full   |
|  mri_head_short  |
|  mri_head_%      |
|  mri_%           |
|  ct%             |
|  ct_head%        |

I need to select all values ​​whose patterns match, for example " ct_head_short ", namely ct% and ct_head% . Is it real?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2019-03-07
@Surzhikov

where 'ct_head_short' like template
seqscan is expected, but will work for a small number of rows

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question