update in table partition by hash
183385Mar 4 2009 — edited Mar 4 2009I have a table partitioned by hash. I want to make some updates (not on the partition key column and also not based on this column, i.e this column is not used in where clause).
Do I need to specify partition name in the query?
For a concrete example:
CREATE TABLE invoices
(invoice_id NUMBER NOT NULL,
customer_id NUMBER NOT NULL,
invoice_date DATE NOT NULL,
comments VARCHAR2(500))
PARTITION BY HASH (customer_id)
PARTITIONS 10
primary key is customer_id + invoice_date
I need to update invoice_id based on the rowid, like update invoices set invoice_id = MEMO_ID_1SQ.nextval where rowid = <variable>. I will be running this query from multiple processes and I want to make sure they are hitting different partitions, so they actually run in parallel.
Thanks in advance,
Radu