I would use a composite (multi-column) key.
CREATE TABLE INFO (
t1ID INT,
t2ID INT,
PRIMARY KEY (t1ID, t2ID)
)
This way you can have t1ID and t2ID as foreign keys pointing to their respective tables as well.
More Related Contents:
- Is there a REAL performance difference between INT and VARCHAR primary keys?
- ALTER TABLE to add a composite primary key
- Composite Primary Key performance drawback in MySQL
- MyISAM versus InnoDB [closed]
- How do I specify unique constraint for multiple columns in MySQL?
- difference between primary key and unique key
- Insert auto increment primary key to existing table
- Difference between Key, Primary Key, Unique Key and Index in MySQL
- What’s the difference between MyISAM and InnoDB? [duplicate]
- MySql: MyISAM vs. Inno DB! [closed]
- MyIsam engine transaction support
- auto increment primary leaving gaps in counting
- Remove Primary Key in MySQL
- MySQL: #1075 – Incorrect table definition; autoincrement vs another key?
- How to lock a single row
- How can I check MySQL engine type for a specific table?
- MySQL InnoDB: autoincrement non-primary key
- Strings as Primary Keys in MYSQL Database [closed]
- Why doesn’t MySQL’s MyISAM engine support Foreign keys?
- How to make a primary key start from 1000?
- Defining Composite Key with Auto Increment in MySQL
- MySQL – Meaning of “PRIMARY KEY”, “UNIQUE KEY” and “KEY” when used together while creating a table
- Multi-Column Primary Key in MySQL 5
- Should I always prefer MySQL InnoDB over MyISAM?
- make an ID in a mysql table auto_increment (after the fact)
- ROW_NUMBER() in MySQL
- sql joins as venn diagram
- How can I join multiple SQL tables using the IDs?
- Selecting random rows with MySQL
- django cannot connect mysql in docker-compose