Filter data
While the Services tool window displays output of your queries, the data editor displays data of a database object as is.
The following topic shows how you can filter data in the data editor. For more information about working with query results in the Services tool window, refer to Query results.
In the data editor, you can filter data by using the following approaches:
You can use the local filter to filter rows by values in columns.
You can specify filtering conditions manually or use quick filtering options. Quick options are filtering conditions for the current column name. The conditions depend on the value in the current cell.
You can filter rows by pressing Ctrl0F and running a search on the table.
You can use the WHERE filter and filter data in a table by writing a query in the WHERE field.
For more information about filtering tables within a schema in Database tool window, see Speed search in tool windows.
Click the Enable Local Filter button on the toolbar.
In the header of the column, click the filter icon that appears.
To filter the rows by values, either select the values from the list or enter them into the text field.
To filter the rows by values of more columns, click the filter icon and select the values for the other columns.
You can toggle the local filter on and off, PyCharm remembers the filtering conditions.
note
Available only for the database objects data, not for the query results set.
Right-click a cell or multiple cells and navigate to Filter by.
Select an option that you want to apply.
Press Ctrl0F and select Filter Rows.
Start typing your search query (for example,
John
).
note
If the filter is not available, click the settings icon () and select Show Filter. Alternatively, press CtrlAltShift0F.
note
Available only in the data editor, not in the Services tool window.
In the WHERE field, type your query. The query syntax is the same as in the
WHERE
clause but without the keyword.Press Enter.
To reset the filter, click the clear icon (), or delete the contents of the row filter field and press Enter.
To open the filter history, click the arrow icon near the WHERE keyword.
tip
In the WHERE filter, you can use SQL wildcards within the
LIKE
expressions. For example, the percent sign%
for zero or more characters and underscore_
for a single character.
Thanks for your feedback!