SQL-Basics – Subqueries: Update column with values from another column
Sometimes You screw up your database design and you have redundancies i.e. your database is not normalized. If You want to correct that: Subqueries for the rescue! In our example we have two tables which contain almost the same information: CREATE TABLE installed_device (`id` int, `device` text, `info` text); INSERT INTO installed_device (`id`, `device`, `info`)…