> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tablepro.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Filtering

> Filter table data with 18 operators, raw SQL, and saved presets

# Filtering

Press `Cmd+F` while viewing a table to open the filter panel. Type a raw SQL WHERE clause and press `Enter` to filter. Raw SQL is the default mode.

Each row has a checkbox, a column picker, operator, value field, and **+**/**−** buttons. Multiple rows combine with **AND** or **OR** (toggle in the header). Click **Apply**, press `Enter` in a value field, or press `Cmd+Return` to run all active filters. Click **Unset** to clear all.

Uncheck a row to turn that filter off without deleting it. The header **Apply** runs only the checked filters; unchecked ones stay dimmed in the panel so you can switch them back on later. Toggling a checkbox does not re-run the query on its own, press **Apply** when you are ready.

Each row also has its own **Apply** button. It filters the table by just that row, without changing any checkbox. The checkboxes stay as they are, so you can test one condition on its own and then go back to the checked set with the header **Apply**.

When you reopen a table, TablePro restores the filters you last applied to it, including the ones you left unchecked, after you quit and relaunch. If you clear the filter with **Unset** or remove its conditions with **−**, reopening the table shows it unfiltered. Filters are remembered per connection. Tables with active filters open in a new tab when you click another table.

## Operators

18 operators with SQL symbols shown inline: `=`, `!=`, `LIKE %..%`, `NOT LIKE %..%`, `LIKE ..%`, `LIKE %..`, `>`, `>=`, `<`, `<=`, IS NULL, IS NOT NULL, IS EMPTY, IS NOT EMPTY, `IN (..)`, `NOT IN (..)`, `BETWEEN`, `~` (regex).

BETWEEN shows two value fields. IN/NOT IN takes comma-separated values.

## Raw SQL

The default mode. Type any WHERE condition directly:

```sql theme={null}
created_at > NOW() - INTERVAL 7 DAY
```

```sql theme={null}
price * quantity > 1000
```

As you type, autocomplete suggests the table's columns and SQL keywords at every position in the expression, including after AND and OR. Use the arrow keys to pick a suggestion and Tab or Return to insert it.

To switch a row to column mode, select a column from the picker.

<Warning>
  Raw SQL is injected directly into the WHERE clause. Ensure syntax matches your database type.
</Warning>

## Presets

Save and load filter configurations via the **⋯** menu in the header.

| Action | How                                |
| ------ | ---------------------------------- |
| Save   | ⋯ > **Save as Preset...**          |
| Load   | ⋯ > click preset name              |
| Delete | ⋯ > **Delete Preset** > click name |

## SQL Preview

⋯ > **Preview Query** shows the generated WHERE clause with a copy button.

## Settings

⋯ > **Filter Settings** to configure:

| Setting          | Options                                       |
| ---------------- | --------------------------------------------- |
| Default Column   | Raw SQL, Primary Key, Any Column              |
| Default Operator | Equal, Contains                               |
| Panel State      | Always Hide, Always Show, Restore Last Filter |

**Panel State** controls what happens when you reopen a table. **Restore Last Filter** (the default) brings back the filter you last applied. **Always Hide** reopens tables unfiltered with the panel closed. **Always Show** keeps the filter panel visible even when no filter is set.
