I know it must be simple, but I'm having trouble solving it. I have a table called "enterprise". In this table, I have 4 specific fields that store different ID's from other records in that same table.
Example of the enterprise table. The values of the fields do not follow this same order, it was just to exemplify:
id relacionado1 relacionado2 relacionado3 relacionado4
10 15 16 17 18
15 10 16 17 18
16 15 10 17 18
17 15 16 10 18
I need to make a select, showing for example all records with id equal to the fields of related tables1, related2, related3, related4.
How can I do this? I can not do it at all. Thank you in advance!