I am trying to create a new table that combines columns from two different tables using an id column that is common to both as a keyword. Let's imagine then that I have a database named db.db that includes two tables named table1 and table2.
table1 looks like this:
id | item | price
-------------
1 | book | 20
2 | copy | 30
3 | pen | 10
and table2 like this:
id | shop | color
-------------
1 | 11 | blue
2 | 34 | red
3 | 25 | red
What should I write in sqlite3 to have something like this??
id | item | price | shop | color
-------------------------------
1 | book | 20 | 11 | blue
2 | copy | 30 | 34 | red
3 | pen | 10 | 25 | red
Thanks!