SQL UPDATE SET one column to be equal to a value in a related table referenced by a different column I hope that made sense, let me elaborate There is a table of tracking data for a quiz program where each row has. Question. ID and Answer. ID there is a table for each. So because of a bug there were a bunch of Question. IDs set to NULL, but the Question. ID of a related Answer. Lets take a look some examples of adding a new column to an existing table. MySQL ADD COLUMN examples. First, we create a table named vendors for the demonstration. I have two tables, both looking like id name value 1 Joe 22 2 Derk 30 I need to copy the value of value from tableA to tableB based on. Learn how to use SQL Server management Studio to perform Insert update and delete query on table. B25329_01/doc/appdev.102/b25108/img/xe_script_editor_results.gif' alt='Update Query To Add New Column To Table Sql' title='Update Query To Add New Column To Table Sql' />Knex. SQL query builder for Postgres, MSSQL, MySQL, MariaDB, SQLite3, and Oracle designed to be flexible, portable, and fun to use. ID is in the Answers table. So say Question. ID is NULL and Answer. ID is 5. 00, if we go to the Answers table and find Answer. ID 5. 00 there is a column with the Question. ID that should have been where the NULL value is. So basically I want to set each NULL Question. ID to be equal to the Question. ID found in the Answers table on the Answer row of the Answer. ID that is in the trackings table same row as the NULL Question. ID that is being written. How would I do this UPDATE Question. Trackings. SET Question. ID need some select query that will get the Question. ID from the Answer. ID in this row. WHERE Question. ID is NULL AND. Not sure how I will be able to make it assign the Question. ID to the Question. Tera How To Make Download Faster Torrent here. ID from the matching Answer.