GUI Filtering and Sorting of Data

SQLyog lets you filter and sort data interactively from the GRID display of the program's RESULT/TABLE DATA tab. The sort and filter criteria selected interactively from the GUI as explained below will be used internally by SQLyog to generate an query with appropriate WHERE and ORDER BY - clauses.

Sorting: When you click on a column header in the GRID the rows of data will be sorted ASCENDING on that columns. If you click once again sort order will change to DESCENDING. Click once more and sort order will again be ASCENDING.

To sort on multiple columns first click on the column that shall be given highest priority in the sorting. Then Ctrl-click on every other column that shall be added to the sort as 2nd, 3rd etc. priority. Also Ctrl-clicking more than once on the same column changes the sort from ASCENDING to DESCENDING and back.

Note: Multiple Sorting can be done only in Table Data tab.

Filtering: Just locate a cell with the value you want to use with the filter and right-click on a cell of the GRID and select the 'filter' option and the filtering operator. Or enter the value in the last empty cell in the data grid without saving. Next click in another cell in the same non-saved row and right-click in the cell where value is added to be filtered and now the context menu with the 'filter' option displays in the grid. There are filter options for all common types of data: numbers, date- and time types and strings. The data shown will be filtered on that column using the criteria entered.

SQLyog also 'smartly' or 'transparently' handles all sort of 'traps' that can occur with filtering of data in SQL. For instance when filtering on a (NULL) value SQLyog uses the condition "IS (NOT) NULL" correctly. User may enter "=" or "<>" as operator and "NULL" or "(NULL)" as operand and in that case SQLyog will frame the query with an "IS NULL|IS NOT NULL" operator. Also all sorts of issues with special characters (characters that must be escaped in SQL) and a special isssue with the LIKE operator and strings containg the "\" (backslash) character are handled automatically.

You undo/reset filtering from the same 'filter' context menu as where you defined the filter.

Custom Filter: SQLyog has an option to Customize filter in both Result and Table data tab. Right click on the grid->Filter->Custom Filter will bring up the Custom Filter dialog box. Choose the column to filter on, filter condition from the drop down. Enter the value to filter on, in the text box. By default it contains the content of the cell on which you right clicked.