Adam Kornick wrote:
>
> SQL Gurus,
>
> I want to update a specific set of rows in a column with a list or
> vector. Something like,
>
> UPDATE some_table SET col = [1 2 3 4 5]
> WHERE some_condition_limits_to_five_rows;
Sorry mate - no, not on any system I can think of either. How is the
system supposed to know which row gets which value? What happens when
your condition returns six rows?
You've got two options: wrap five update statements in a transaction (if
you want to know they all succeed/fail as a group) or build some
procedural solution.
- Richard Huxton