Search Postgresql Archives

Re: Updating 457 rows in a table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 19 May 2024, Ray O'Donnell wrote:

Could you create a table with just person_id values whose rows are to be updated? Then you could do something like this:

update people set active = true where exists (
  select 1 from temporary_table where person_id = people.person_id
);

That's just off the top of my head and might not be correct, but that's the way I'd be thinking.

Ray,

I thought of doing this but it's a one-off activity. I would create and
insert the table, then delete it when done. Will keep this in mind.

Thanks,

Rich






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux