sojin
sojin

Reputation: 4694

Updating multiple table in Sybase

Got a requirement to update certain fields of two tables (which got 60+ millions of rows) and I'm doing the UPDATE in a loop.

I'd like to update two tables in a single UPDATE (as its difficult to query/traverse twice these tables considering the volume of these tables).

I'm looking for something like these,

UPDATE TABLE_A, TABLE_B

SET TABLE_A.column1 = "new value",
SET TABLE_B.column2 = "different value"

FROM TABLE_A a, TABLE_B b, TABLE_C c
WHERE <few conditions>

Sybase doesn't seems like this syntax though. Is there any alternatives anyone aware of ?

Thanks in advance.

Upvotes: 2

Views: 3302

Answers (1)

niktrs
niktrs

Reputation: 10066

As far as I know, you can define only one table in each UPDATE statement

Upvotes: 1

Related Questions