2

I'm running multiple queries at once and was wondering if I can assign different names to each of the tabs, so that the names are more useful than "Result 1", "Result 2", etc.

Luis Perez
  • 27,650
  • 10
  • 79
  • 80

1 Answers1

3

You can name the results tab by adding a special comment just before each query. The comment should be in the following format:

-- NAME: your-tab-name

Where your-tab-name can be anything you want. Here's an example:

-- NAME: premium users
select * from users where premium = 1;

-- NAME: others
select * from users where premium = 0;

Now instead of the tabs being named "Result 1" and "Result 2", they will be named "premium users" and "others".

You can also use the block comment syntax instead:

/* NAME: premium users */
select * from users where premium = 1;

/* NAME: others */
select * from users where premium = 0;

Here's an example of what named tabs would look like:

Navicat named tabs example

Luis Perez
  • 27,650
  • 10
  • 79
  • 80