I’ve got two tables:
Table Name: One
id | status
----+--------
1 | 1
2 | 1
3 | 1
Table Name: Two
id | model
----+--------
1 | m001
2 | m002
3 | m003
Let’s say I want to change the status of m001 to 0. How can I achieve this using an SQL statement? i.e. if model = m001, get id, go to table.one, change status to 0.
Since you haven’t mentioned your
RDBMS, try any of these:For
MySQLFor
MSSQLWhich works on other DBMS