Check Array(STRING) in Postgres column

Asked

Viewed 186 times

-2

Good afternoon, everyone,

I need to UPDATE a table, but for this I need to compare if the values of an ARRAY(STRING) are inside a column of this table, example:

UPDATE tabelaTeste
SET versao = '2'
    WHERE codigo LIKE ['1','3','4']

Someone can provide that little help?

  • Make some attempts and we can help you with the mistake.

1 answer

0

I got through the following way:

update tabelaTeste
SET versao = '2'
    WHERE conta = ANY(['1','3','4'])

Browser other questions tagged

You are not signed in. Login or sign up in order to post.