Hello guys and good day. I have Table "T1" that has primary key "ID" and another Table "T2" that has foreign key "T1ID" reference from the primary key"ID", My problem is the foreign key does not show any records that I insert from the primary key "ID", it should shows the data of the records what I insert in the primary key.
and this is the code that I execute to make foreign key:
Alter table T2 add FOREIGN KEY (T1ID) references T1(ID);
Please help and thank you in advance.
Foreign key"T1ID" supposed to shows the data of the records what I insert in the primary key"ID"

I think you misunderstand what a foreign key is and what it does. A foreign key doesn't "show any records" or "show the data". You use SQL
SELECTstatements to show records and show data.A foreign key is an integrity constraint, and it instructs the database engine to enforce certain integrity rules. A foreign key tells the database that it should enforce a relationship between two table. In this case, specifically, you are telling the database to enforce the validity of the values in the
t2.t1idcolumn.So the database will ensure that for each row in
t2, the value int2.t1idfrom that row is a value oft1.idfor some row int1.The database will then do things like:
t2with a value oft2.t1idthat doesn't exist in any row int1t1if there are any rows int2which have values oft1idthat match that particulart1.idvalue.