I have a set of numbers that i need to use in 2 queries. these are part of the same oracle SQL script for a 11g server:
update table1 set some_column = 1 where user_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
update table2 set some_other_column = 17 where user_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
How do you factor out that list of numbers into a variable and use it in both update statements?