How to link data from a table to another table in sqlite database

database-designsqlite

I need to link data from a table to another table. I'm not sure how to do this. I have never link a table to another table. Anyone can help me? Or maybe can give me examples or sample codes? Thanks =)

Best Answer

Here is an idea that seems to work. Generally speaking though, you can do this like this:

Table1
------
table_key
data_type1
data_type2


Table2
------
table_key
table_key_in_table1 (linked to table1)
data_type1
data_type2
...

And so on.