Auto join suggestion

✓ functional

Start a JOIN and SQLly can offer the ON clause, favoring real foreign keys and clearly labeling its best guesses.

Start typing JOIN OtherTable and SQLly can offer the ON clause. It follows a deterministic join path through the model, preferring declared foreign keys and using name-based relationships only when needed. Each suggestion includes a confidence signal, so a fact and an educated guess never look the same.

How it decides

  1. Declared foreign keys. When a foreign key connects the tables, SQLly uses that exact column mapping first.
  2. Name-inferred relationships. With no FK, SQLly can match conventions such as CustomerId to Customer.Id and labels the suggestion as inferred.
  3. In-scope joins. It only offers tables already present in the current FROM/JOIN set, so its ON clause resolves in the query you have.
SQLly
IntelliSense suggesting a JOIN ON clause
SQLly proposing an ON clause from a declared foreign key, with a confidence indicator.
Confidence matters. A declared-FK join has an exact mapping. An inferred join is often useful too, but it is worth a quick glance before it meets production data.