Here are two SQL statements. One is an select statement and the other is a update statement. I want to combine them.
Select
SELECT * FROM test WHERE `id`='1'
Update
UPDATE test SET `select_count`=`select_count`+'1' WHERE `id`='1'
MySQLselectupdate
Here are two SQL statements. One is an select statement and the other is a update statement. I want to combine them.
Select
SELECT * FROM test WHERE `id`='1'
Update
UPDATE test SET `select_count`=`select_count`+'1' WHERE `id`='1'
Best Answer
Based on your question I think you need to include
SELECT
statement inUPDATE statement
:Sample SQL in below:
Another way: If you have 2 tables (TableA and TableB)