I have written the following SQL statement in MySQL :
USE my_database;
SELECT * FROM some_table WHERE some_column IN (1, 2, 3);
This returns a set of rows that have a column value which is a key into a row of another table (call it some_other_table).
a b c d <--this is the column with the key
1
2
3
I want to say, look up all of the rows in another table with value 1, and do something (null out some column)
Any help is appreciated.
Yes, you can use the multiple-table
UPDATEsyntax:Example:
Before:
After:
UPDATE: Further to comments below.
Another example:
Result: