Lets say I have a 2 SQL tables (table 1, table2). Table 1 has unique IDs. Table 2 has a foreign key to table 1's id.
How do I increment based on that ID.
Example:
Table 1 Table 2
ID foreign key ID
1 1 1
2 1 2
3 2 1
4 2 2
2 3
3 1
3 2
3 3
etc..
Basically what is the sql syntax for the table creation to do this?