I am working on making a new SQLite database. Obviously for a number of reasons, structure and organization is important.
I have an existing database that is everything that I need, except for one column. So I duplicated the original db, and would like to just swap out that one column with new data from a different column in a different table in the db?
Can I do that? Which query is going to let me do that?
The join query just joins temporarily, right? If I need it to physically make the change in the db structure, do I use update?
I don’t have tremendous amounts of experience with SQL queries, so any help here would be appreciated very much!
Without knowing your table structure, this will be the way to go:
It updates
new_columnin yournew_tablewith the value ofold_table.old_column, where theidcolumn matches.You can replace the
WHEREclause in the sub-select by whatever you have to find correlating records.