I'm doing something like the following
select * from mytable
where field1 like '%pattern%' or field2 like '%pattern%';
I actually have 60+ fields so I found that the following was more
convenient even though it's not exactly the same.
select * from mytable
where (field1||field2) like '%pattern%';
My question is, can this be done in a cleaner way? Something that
works similarly to the first example by preference. I thought
select * from mytable
where * like '%pattern%';
Logically described what I wanted, but of course this didn't work
with postgresql (or any other xbase, as far as I can tell).
Please CC: responses to me, if that's convenient. I read the psql
mailing list via an archive which isn't always in sync.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера