Reputation: 28130
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.
Upvotes: 3
Views: 1439
Reputation: 28130
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:
Upvotes: 7