I\'m looking to do a single query to update a database.Here is some pseudocode: UPDATE Table1 SET Table1.Value = (SELECT Value FROM Table2 WHERE Table2.Id==2) WHERE Ta开发者_运维百科ble1.Id == 4
Have a table users and there is a field invited_by_id showing user id of the person who invited this user. Need to make a MySQL query returning rows with all the fields from users plus a invites_count