I'm writing a function in PL/pgSQL
where I need to update a column in multiple rows. However, I need to update only 67 random rows of the larger number of rows.
For example, if I have a table of animals and I want to update the food column for each animal that is labeled cat
, how can I update ONLY 10 of those rows that are cats, and not update the other rows that are cats?