There is a database named Register and in this database there are three tables COUNTRY , CHILDREN and :
IntheCOUNTRYtableIhavetwosignatures:
TogetherwiththeCHILDRENtable:
andtheNETOStable
MytableNETOSisrelatedtothetableCHILDRENcolumnstrong>idFILHOSandmytableCHILDRENisrelatedtotableCOUNTRYbycolumnidPAIS.
SofarIthinkIdideverythingright,thisinitialdataisfortestingpurposesonly,butlet'ssupposethatthesetableswillhavethousandsofentriesandIwanttomakeaquerybythenameofthatperson,andinthatquerybringtherelationfamilyofthisperson,regardlessofthetableyouarelookingfor.
Example1:
Isearchfor%MATILDE%
MATILDEGONZAGAEFILHADEJOSEFIRMINOFRAGAENETADESEVERINOFIRMINOSILVA
Example2:
Isearchfor%MARIA%
MARIALEITAOGONZAGAEFILHADEJOSEFINAMONICALEITAOEMAEDEHEITORDOSANJOS#eutambémteriaqueterumacolunareferenteaosexo#masissonãovemaocasoagora
Inshort:Iwanttoreturnthe"name" field of all related tables resulting from my query.
If it was not clear, ask me in the comments.