Skip to content
Advertisement

Change + ordered to + leading

I’m trying try to find the most selective criteria to start joining in SQL.

I tried this:

But this + ordered is deprecated. How I can implement this query using + leading?

Advertisement

Answer

Use the leading hint and put the table aliases between parentheses in the order you want the database to join them, for example:

This would tell the database to start with src (nc_references), then o (nc_objects), etc.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement