Blog Post

Opening the SQL Prompt Command Palette

,

A few years ago SQL Prompt added a command palette to let you search the commands available. This is similar to the same concept in Visual Studio Code, ADS, and various other tools. This post looks at how to get to this tool in SSMS.

This is part of a series of posts on SQL Prompt, which is an amazing productivity tool from Redgate Software.

Opening the Palette

You can also open the Command Palette from the menu. In the SQL Prompt menu, it is the first item. You can also see there is a shortcut of ALT+S below here.

2023-09-04 04_44_26-

When I click this, I’ll see the full list of palette commands. This is a large window, and across the top I can filter things. In the complete list, you see various things: objects, snippets, and refactoring commands. We also have the Prompt behavior settings as well.

2023-09-04 04_44_43-SQL Prompt_ Command Palette

For example, I could look for things with “brackets”. I see a few things that are relevant. I can pick any of them if I want that apply to my code or change the behavior of the tool

2023-09-04 04_52_25-SQL Prompt_ Command Palette

Adding to the Menu

If you can’t remember the shortcut. or don’t want to use the menu, you can add this as a button in the toolbar. Here’s the easy way. When you installed SQL Prompt (or the Toolbelt), there is a Redgate toolbar added. Mine looks like this:

2023-09-04 07_29_16-SQLQuery3.sql - ..dlm_1_dev (WAY0UTWESTHP_way0u (92)) - Microsoft SQL Server Man

I clicked the “Add or Remote buttons ” and got a list of buttons on this toolbar. I can click “Customize if I like. That opens the dialog below.

2023-09-04 07_51_53-Customize

Now click “Add Command”. That gives you a list of items in all the menus in SSMS. Pick the SQL Prompt menu on the left (first one). Then scroll down and find “Open command palette” in the right side. Select it and click OK.

2023-09-04 07_52_16-SQLQuery3.sql - ..dlm_1_dev (WAY0UTWESTHP_way0u (92)) - Microsoft SQL Server Man

Now you have this in your toolbar.

2023-09-04 07_52_25-SQLQuery3.sql - ..dlm_1_dev (WAY0UTWESTHP_way0u (92)) - Microsoft SQL Server Man

Now one click, and you have the palette.

FWIW, you can use this trick to add any menu item to a toolbar that you want.

UPDATE: A comment asked about partial matches, and you can see I see partial matches for “Addre”.

Partial match of a word in the command palette

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating