Query Editor

Query Editor allows you to create and edit query text, prepare and execute selected queries. You can define multiple statements in one query window. For some server types, you can drag-and-drop or double-click an identifier in the right Identifiers pane to add it to the editor.

Query Formatting

Navicat provides advanced tools to maintain clean and readable code. Access these options via the Format menu:

Real-time Error Detection

Navicat continuously analyzes your query as you type to identify potential issues before you execute the query. When the editor detects a mistake (for example, a syntax error or an invalid column reference), it immediately underlines the problematic code. You can hover over the marked code to view a detailed error description, allowing you to catch and fix mistakes instantly.

If the AI Assistant is enabled, the error popup will include a Fix with AI link. Clicking this link allows the AI to analyze the context of your query and suggest a corrected version of the code.

Hover Info

The Hover Info feature helps you stay in the flow of writing and refining your queries. By simply hovering your cursor over any table or column name in your query text, you can instantly view essential metadata without ever having to switch tabs.

When the information popup appears, it offers several interactive tools to speed up your workflow:

Go to Declaration

You can press CTRL and click on an identifier (e.g. a table name or field name) to instantly jump to its designer or data editor, or locate and highlight it within the navigation pane.

Note: You can set the preferred default jump action in Options.

Refactoring (Available only in Enterprise and Standard Edition)

Navicat includes intelligent code refactoring utilities to safely update code blocks and identifiers across your active editor. Right-click your code and choose from the Refactor menu:

Clipboard Stack

The Clipboard Stack acts as an extended memory for your "Copy" and "Cut" actions, storing up to 10 items using Last-In-First-Out (LIFO) logic.

Code Folding

Code folding allows you to collapse long blocks of code so you can focus on specific sections of your code. You can click the icon to toggle between collapsing and expanding the code.

Syntax Highlighting

To improve readability, Navicat applies color coding to text fragments based on the specific database type associated with the query. Highlighting changes based on the reserved keywords of the target database.

Note: You can personalize these colors in Options to suit your visual preferences.

Brace Highlighting

Navicat automatically identifies and highlights matching pairs of braces, such as () , [], {} and BEGIN…END. Simply place your cursor on or immediately next to a brace to see its matching partner highlighted.

Note: The cursor must be positioned on a brace for the matching highlight to appear.

Usage Highlighting

Click on an identifier or alias to instantly highlight every instance of that symbol across your query. This visual tracking makes complex joins and long scripts much easier to trace.

Find and Replace

Find

The Find bar provides a quick way to search for text within the editor. You can access this feature by choosing Edit -> Find from the menu or by pressing CTRL+F.

Once you enter a search string, the search starts at the cursor's current position and proceeds to the end of the file. To locate the next occurrence of the text, simply click the Next button or press F3.

Replace

To open the Replace bar, simply check the Replace box. Then, enter the text you want to search and replace.

Click the Replace button to replace the first occurrence.

Click the Replace All button to replace all occurrences automatically.

Advanced Search Options

To access additional search options, click the Settings icon or the associated drop-down menu:

Option

Description

Highlight All

Highlight all matches in the editor.

Incremental Search

Find matched text for the search string as each character is typed.

Match Case

Enable case sensitive search.

Regular Expression

Search regular expressions.

Whole Word

Return the objects that match the entire word of the search string.

Copy with Quotes

To copy a statement formatted with quotes for use in programming code, right-click the highlighted code in the editor, select Copy with Quotes, and choose your preferred language.

Word Wrap

When Word Wrap mode is enabled, the horizontal scrollbar is removed, and any statement that exceeds the width of the editor window automatically wraps to the next line. You can toggle this feature by choosing View -> Word Wrap.

Zoom In and Out

Navicat provides the ability to adjust the magnification of the text size within the editor for better visibility or navigation. You can access these options via View -> Display -> Zoom.

Alternatively, you can achieve the exact same effect using the following keyboard shortcuts:

Note: Zoom levels are applied locally; editors opened in different tabs or windows will remain unaffected by changes made in the current window.

On this page