As we know subquery take time in execution. What is the best way to remove use of subquery?
I have 2 table one is Table1 another is Table2. There is one to many mapping like Table2 has multiple record for a single Table1 record . i want to get a single row for each table 1 row.
For example if Table 1 has a row with id: 1 and Table 2 has 3 rows with reference id 1.
i don't want to get 3 rows, when i will apply join then there will be 3 rows as result, I want to get first record only from table 2 with a Table1 row. How can i achieve this?