Quick Start
Connect to MySQL
Databases
Tables
Adding Fields and Choosing Data Types
Customising Fields
Primary Keys and Indexes
Filter Wizard
Foreign Keys
Import/Export
Queries
Visual Query Builder
Stored Procedure
Data
Manage Users
Backup
Data Transfer
Schedule
Server Monitor
Maintaining your databases/tables
  Working with Queries
 

Create a query

  1. In the Database Window , click the Query tab
  2. To create a new query, click New Query button in the Database Window

Open or run a query

  1. In the Database Window , click the Query tab
  2. Select the query that you want to open in the Database Window
  3. To open the query in Data View, click Open Query button in the Database Window
  4. To open the query in Design View, click Design Query button in the Database Window
  5. To run the query, press Run button.

Delete a query

  1. In the Database Window , click the Query tab
  2. Select the query that you want to delete, click Delete Query button in the Database Window

Save a query

Navicat keep your queries separately for each database so that you will always see your queries that is specific to a database in the Database Window. See Connect to MySQL, Setting up Connections for more information on the queries saving locations.

Load SQL file (.sql extension)

  1. In the Database Window , click the Query tab
  2. click New Query button in the Database Window
  3. click to load a sql file. The SQL statements inside the file will be shown in SQL window.
    You can click Run button to execute the statements.

Create a Schedule Task for Query Execution

Please visit Work With Batch Job/Schedule for details

Running saved queries from the command line

  1. Create and save the query as described in the steps above
  2. From the command line start Navicat using the following options
    ./start-navicat --query ConnectionName DatabaseName QueryName

Replace ConnectionName with the name of your connection, DatabaseName with the name of the database and QueryName with the name of the saved query.