Table value introspection

✓ functional

Bring real, distinct values into completion so a WHERE clause is less of a guessing game.

When you are completing a value such as WHERE Status = , SQLly looks into the table and offers the distinct values the column really holds. It saves you from guessing at a label, or opening a scratch query just to find out what the four allowed statuses are.

How it works

  1. Press Ctrl+Shift+Space (or use Table Column Value Autocomplete) with the cursor in a value position.
  2. SQLly resolves which table and column that position refers to - following the aliases and joins already in your query.
  3. It runs a SELECT DISTINCT for that column, capped at 100 values, in the dialect of your connection.
  4. The values appear in the completion list, ready to insert. Keep typing and the list narrows in memory rather than re-querying.
SQLly
IntelliSense offering real column values in a WHERE clause
Value completion offering the real distinct values of a column inside a WHERE clause.

Where it earns its keep

  • Status and type columns - the classic case. Is it shipped, SHIPPED, or Shipped? Now you know, instead of running the query twice.
  • Inherited schemas - a column whose permitted values nobody wrote down, in a table nobody remembers designing.
  • Catching the empty case early - a column that offers nothing is itself an answer: the filter you were about to write would have returned no rows.
Bounded and cached. One capped, distinct query per column, cached per connection and database with least-recently-used eviction. It stays quick on wide tables instead of becoming the thing that slows down typing - and it never runs unless you ask.

Values are compared and inserted as they exist in the column. SQLly does not normalise casing or trim whitespace on your behalf, because a value that only differs by a trailing space is exactly the kind of thing you want to see.