The sample can go on any columns, including the key. The relationship of the fields in the query, we write based on the logic of relationships that we know. Yes, in most cases, we form our knowledge about communication in the form of foreign keys, so that the database understands this and can check if they are trying to write contradictory data in the tables. Those. for example, to delete a record from the parent table for which there are records in the child table or that in the child table do not try to insert records with non-existing key values in the parent.
The request can be written and executed regardless of the existence of a foreign key. You think meant such request:
select * from ТЕСТ1 join ТЕСТ2 on id = id_ТЕСТ1