

To add the table alias, simply double-click the table name and enter the alias in the Diagram Design pane. You can assign table aliases by clicking on "" beside each table.We'll be needing the actor, film_actor, and film tables. Drag a table/view from the left pane to the Diagram Design pane or double-click it to add it to query.It's a good idea to select the tables first, so that the Query Builder knows which fields to present for the field list: The database objects are displayed in left pane, whereas the right pane is divided into two portions: the upper Diagram Design pane, and the lower Syntax pane:Ĭonstructing the Actors for Year's Films Query In the Query Designer, click the Query Builder button to open the visual SQL Builder.Click the Query icon on the main toolbar, followed by the New Query button from the Object toolbar:.Let's bring it up by opening a new query: It's accessible from the Query Designer screen. You can think of the Query Builder as a tool for building queries visually. Please refer to the Generating Reports on MySQL Data tutorial for instructions on downloading and installing the Sakila database. The database contains a number of tables themed around the film industry that cover everything from actors and film studios to video rental stores. A former member of the MySQL AB documentation team named Mike Hillyer created the Sakila database specifically for the purpose of providing a standard schema for use in books, tutorials, and articles just like the one you're reading. The query that we'll be building will run against the Sakila sample database. In today's blog, we'll use it to write a query to fetch a list of actors that appeared in movies released during a given year.

Available in Non-Essentials editions of Navicat for MySQL, PostgreSQL, SQLite, MariaDB, and Navicat Premium, the Query Builder allows anyone to create and edit queries with only a cursory knowledge of SQL.
