I have the following problem:
Suppose I have defined TWO tables
USERS
ID (int. key) NAME (String) SALARY (currency)
USERSADD
ID (int. key) TYPE (String)
The second table stores additional information for USERS. Obviously, real tables are more complicated, but this is an idea. (Do not ask me why another table is created instead of adding fields to the first table, this is my boss idea).
Now I am trying to UPDATE the first table if the condition from the second table is satisfied.
Something like that:
UPDATE USERS U, USERSADD A SET U.SALARY = 1000 WHERE U.ID = A.ID AND A.TYPE = 'Manager'
In Netbeans Derby, I have an error: "found in column X" and it refers to a comma between two tables ( UPDATE USERS U , USERSADD A ). Hope I was clear enough ...
Will anyone kindly provide me a solution? Thanks in advance.
Eddie source share