Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

1 votes
1 answers
393 views
How do I open a table from a query in SSMS?
In Oracle SQL Developer, I am able to Ctrl+Click on a table name within a query and the table definition automatically opens. This is useful it alleviates my need to manually navigate the database tree to find the table I'm looking for. Is there a similar feature in SSMS that lets me quickly open a...
In Oracle SQL Developer, I am able to Ctrl+Click on a table name within a query and the table definition automatically opens. This is useful it alleviates my need to manually navigate the database tree to find the table I'm looking for. Is there a similar feature in SSMS that lets me quickly open a table referenced in a query? I found a question related to accomplishing this in Oracle , but nothing for SSMS.
Code Novice (275 rep)
Sep 10, 2019, 07:58 PM • Last activity: Jul 15, 2025, 03:37 PM
0 votes
0 answers
13 views
DBeaver hide left and bottom pane
See image below. Is there a shortcut to toggle the left pane (yellow rectangle) and bottom pane (green rectangle). Also, is there a way for the left pane to automatically resize based on the expanded elements' text width? [![Reference image][1]][1] [1]: https://i.sstatic.net/TMTekDaJ.png
See image below. Is there a shortcut to toggle the left pane (yellow rectangle) and bottom pane (green rectangle). Also, is there a way for the left pane to automatically resize based on the expanded elements' text width? Reference image
Matej Vesel (1 rep)
May 8, 2025, 11:00 AM
3 votes
2 answers
3746 views
Ctrl-F1 shortcut stopped working in SSMS 2014
I've had the Ctrl - F1 query shortcut bound to `sp_whoisactive` for years (this technique is described in https://dba.stackexchange.com/questions/16182/how-to-assign-ctrlf1-to-sp-whoisactive-in-ssms-2012). A few days ago, it stopped working. If I hit Ctrl - F1 , SQL Studio now launches Books Online...
I've had the Ctrl-F1 query shortcut bound to sp_whoisactive for years (this technique is described in https://dba.stackexchange.com/questions/16182/how-to-assign-ctrlf1-to-sp-whoisactive-in-ssms-2012) . A few days ago, it stopped working. If I hit Ctrl-F1, SQL Studio now launches Books Online in Internet Explorer. Has anyone else seen this problem? Is there a fix? I confirmed that the shortcut it still set. Changing the shortcut does not fix the problem, Ctrl-F1 still launches BoL. Cycling SQL Studio has had no effect. FWIW, this happened after IT restarted the server while I was logged in, so SSMS did not shut down clean. I can of course use another keyboard shortcut (though sadly it seems Ctrl-1 is hardcoded to sp_help), it just bothers my OCD to use a different shortcut for the same command on different machines.
Jon of All Trades (5987 rep)
Oct 30, 2014, 04:18 PM • Last activity: Jan 20, 2025, 10:13 PM
21 votes
3 answers
16411 views
Keyboard shortcut to execute statement at cursor in pgAdmin
In MySQL Workbench, one can [use](https://dev.mysql.com/doc/workbench/en/wb-keys.html) the keyboard shortcut Ctrl + ENTER to execute the statement at cursor (delineated with semi colons). Is there a similar shortcut in pgAdmin? ---------- For SQL queries that span on only one line, I use a voice com...
In MySQL Workbench, one can [use](https://dev.mysql.com/doc/workbench/en/wb-keys.html) the keyboard shortcut Ctrl + ENTER to execute the statement at cursor (delineated with semi colons). Is there a similar shortcut in pgAdmin? ---------- For SQL queries that span on only one line, I use a voice command in Dragon NaturallySpeaking: Sub Main SendKeys "{End}" Wait(0.3) SendKeys "+{Home}" Wait(0.3) SendKeys "{F5}" End Sub enter image description here but I don't have any solution for SQL queries that span although more than one line.
Franck Dernoncourt (2093 rep)
Nov 7, 2015, 04:01 AM • Last activity: May 30, 2024, 08:59 AM
13 votes
1 answers
38101 views
"New query window" shortcut for Oracle SQL Developer
I'm used to Ctrl-N to give me a new query window in SSMS. How do I do it in Oracle?
I'm used to Ctrl-N to give me a new query window in SSMS. How do I do it in Oracle?
birdus (253 rep)
Apr 12, 2019, 09:50 PM • Last activity: Nov 14, 2023, 08:02 PM
0 votes
1 answers
1624 views
Shortcut for 'Select Top 1000 Rows'
There has to be a better way! When writing a subquery code I need all the rows listed from a table so I can manipulate what I want grouped/summed/etc. The only way I have found to do this is to find that table in the SQL Object Explorer, right click, and hit 'Select Top 1000 Rows', then copying and...
There has to be a better way! When writing a subquery code I need all the rows listed from a table so I can manipulate what I want grouped/summed/etc. The only way I have found to do this is to find that table in the SQL Object Explorer, right click, and hit 'Select Top 1000 Rows', then copying and pasting into my subquery. Isn't there a shortcut or something so I don't have to get out of my query to do that? Why can't I select the table and right click or something. Please someone tell me there is a better way!!
Greg Nelson (1 rep)
Jul 23, 2021, 03:38 PM • Last activity: Jul 24, 2021, 02:49 AM
2 votes
1 answers
340 views
About Apex SQL Refactor and SSMS keyboard shortcuts being broken
Hi DBA Stack Exchange! Today I tried Apex SQL Refactor and right from the get go, once installed and integrated into my T-SQL dev tool of Choice (SSMS 18.3.1) I noticed that some Keyboard shortcuts stopped working. One example (maybe there are more, but this one I’m pretty sure): After installing an...
Hi DBA Stack Exchange! Today I tried Apex SQL Refactor and right from the get go, once installed and integrated into my T-SQL dev tool of Choice (SSMS 18.3.1) I noticed that some Keyboard shortcuts stopped working. One example (maybe there are more, but this one I’m pretty sure): After installing and using SQL Refactor for first time (Refactor needs to be used at least once for this to happen) the “Available Databases” functionality in SSMS (which can be invoked by CTRL+U) no longer works. What is worse, this is not a configurable shortcut (like most of the Keyboard shortcuts that can be configured on Tools -> Options -> Keyboard) so once it is broken, the only solution so far (to make it work again) is to uninstall SQL Refactor. This query shortcut (“Available Databases”) is an extremely useful one that people use it over and over again on SQL Sessions, so breaking the shortcut is a major thing for me. enter image description here I’m running the latest available builds of both SSMS (18.3.1) and Apex SQL Refactor (2018.08.0364) **My question is: have you also experienced this? If so, how did you solve the issue of keyboard shortcuts being irreparably lost after Apex SQL Refactor?** If you need me to provide any additional info about my system or logs that could help you reproduce this issue, just let me know. Thanks to all of you!
Martin Surasky (773 rep)
Oct 17, 2019, 02:27 AM • Last activity: Oct 22, 2019, 06:27 AM
1 votes
0 answers
42 views
SSMS - Can I create a default layout?
Using SSMS 11 to connect to a SQL Server 2012 instance. 1. When I first load up SSMS and log-in, is it possible to have specific nodes in the object explorer expand? I always expand the tables node in a few of the databases that I am constantly accessing, along with the SQL Agent Jobs node. 2. Whene...
Using SSMS 11 to connect to a SQL Server 2012 instance. 1. When I first load up SSMS and log-in, is it possible to have specific nodes in the object explorer expand? I always expand the tables node in a few of the databases that I am constantly accessing, along with the SQL Agent Jobs node. 2. Whenever I add a new table via T-SQL, I refresh the cache with CTRL+SHIFT+R, but I also want to refresh the object explorer tables node without having to use my mouse to right click on "Tables" and hit refresh. In the object explorer, is there a shortcut key to refresh the node you're currently working in? These sound like minor things, but they'd dramatically improve workflow since I encounter them regularly every day.
eek (133 rep)
Jun 10, 2019, 10:35 PM
2 votes
1 answers
260 views
Shortcut to select all SQL text in Access
When working in the SQL view in MS Access, is there a shortcut to select all the text in a SQL query. For example, most text editors in Windows follow the {Ctrl+ a} combination, but this doesn't seem to have any affect within Access. Is there some other combination? It is useful when copying text fr...
When working in the SQL view in MS Access, is there a shortcut to select all the text in a SQL query. For example, most text editors in Windows follow the {Ctrl+ a} combination, but this doesn't seem to have any affect within Access. Is there some other combination? It is useful when copying text from an outside editor into the Access SQL query creator. Thanks!
James Peter McConnell (265 rep)
Apr 4, 2017, 02:08 PM • Last activity: Apr 4, 2017, 02:21 PM
2 votes
0 answers
582 views
Shortcut for Applying stored procedures in MySQL Workbench
Using MySQL Workbench, after editing a stored procedure in the built-in editor, the only way I know how to commit the changes are to take my hands off the keyboard, use the mouse, and click "Apply", which does nothing but show me a dialog box, on which I must click "Apply" yet again, which commits t...
Using MySQL Workbench, after editing a stored procedure in the built-in editor, the only way I know how to commit the changes are to take my hands off the keyboard, use the mouse, and click "Apply", which does nothing but show me a dialog box, on which I must click "Apply" yet again, which commits the changes buy yields YET ANOTHER dialog box saying that things went OK, on which I must click "Finish". That's a lot of nonsense to mess with. Is there a shortcut key that will allow me to commit a stored procedure with a single keystroke, or any other mechanism that will shorten the process?
BRebey (121 rep)
Dec 3, 2016, 03:23 PM
4 votes
2 answers
6698 views
SSMS shortcut to comment/uncomment a specific part of the query?
I'm looking for an option to comment/uncomment a particular part of the query with the [Slash Star Comment][1] option. **Scenario:** While debugging the queries with **N** numbers of `JOIN`s, I comment out each table in the join and its related conditions one by one and find which table causing the...
I'm looking for an option to comment/uncomment a particular part of the query with the Slash Star Comment option. **Scenario:** While debugging the queries with **N** numbers of JOINs, I comment out each table in the join and its related conditions one by one and find which table causing the issue or wrong data. If the commented table didn't cause the issue, I will uncomment the table and its related condition and try with the next table. For this purpose currently I manually add -- comment in front of the particular line or press Ctrl + C to comment the entire line, if the select/conditions are in middle of the line, I move the select/condition alone to the next line and add -- comment . If there is no issues with the join, again I undo the changes or Ctrl + U to uncomment. Moving the condition to the new line and adding the comment is burden to me, some time it caused bad alignment too. **Expectation:** What I want is need some shortcut key to add the /* in front and */ in end of the selected text. **Samples:** The below is the sample case, which my query looks like (in actual it may contain more select columns, tables and conditions). SELECT T1.Id, T1.Name, T1.Designation, T1.CreatedDate, T2.AccountName, T3.LinkId, T3.LinkName, T4.OwnershipName FROM TableOne T1 INNER JOIN TableTwo T2 ON T2.Id = T1.Id AND T2.Name = T1.Name INNER JOIN TableThree T3 ON T3.Id = T2.Id AND T3.IsActive = 1 INNER JOIN TableFour T4 ON T4.Id = T1.Id AND T4.LinkId = T3.LinkId AND T4.IsActive = 1 WHERE T1.CreatedDate BETWEEN @FromDate AND @ToDate AND T1.DeletedDate IS NULL AND T2.DeletedDate IS NULL AND T3.DeletedDate IS NULL AND T4.DeletedDate IS NULL Here if I want to comment the TableThree and its related content in the SELECT, JOIN and conditions in WHERE. I will select the content and press the shortcut key to add the /* */ comment separately. Expected the behavior is: SELECT T1.Id, T1.Name, T1.Designation, T1.CreatedDate, T2.AccountName/*, T3.LinkId, T3.LinkName*/, T4.OwnershipName FROM TableOne T1 INNER JOIN TableTwo T2 ON T2.Id = T1.Id AND T2.Name = T1.Name /*INNER JOIN TableThree T3 ON T3.Id = T2.Id AND T3.IsActive = 1*/ INNER JOIN TableFour T4 ON T4.Id = T1.Id /*AND T4.LinkId = T3.LinkId*/ AND T4.IsActive = 1 WHERE T1.CreatedDate BETWEEN @FromDate AND @ToDate AND T1.DeletedDate IS NULL AND T2.DeletedDate IS NULL /*AND T3.DeletedDate IS NULL*/ AND T4.DeletedDate IS NULL
Arulkumar (1137 rep)
Aug 18, 2016, 07:55 AM • Last activity: Aug 18, 2016, 10:24 AM
1 votes
1 answers
547 views
Microsoft sql server management studio (SSMS) shortcut for changing size of sql/result panes
In the good old days there was a shortcut `ctrl-B` for changing the size of the Query & Result panes in the Query Analyzer sql editor. In Query Analyzer, just press `ctrl-B` and the screen splitter handle was in focus. Then repeatedly press up/down arrows until the size was right. Is there a shortcu...
In the good old days there was a shortcut ctrl-B for changing the size of the Query & Result panes in the Query Analyzer sql editor. In Query Analyzer, just press ctrl-B and the screen splitter handle was in focus. Then repeatedly press up/down arrows until the size was right. Is there a shortcut for that nowadays, in SSMS?
LosManos (115 rep)
May 16, 2016, 11:09 AM • Last activity: May 16, 2016, 12:51 PM
2 votes
1 answers
936 views
Shortcut for deleting a line of SQL
Is there a shortcut to delete your current line of SQL without highlighting the full line? I want to delete the line that my cursor is on without selecting the whole line. So in visual studio CTRL + L will delete the full line.
Is there a shortcut to delete your current line of SQL without highlighting the full line? I want to delete the line that my cursor is on without selecting the whole line. So in visual studio CTRL + L will delete the full line.
joe (319 rep)
Apr 23, 2015, 08:55 PM • Last activity: Apr 23, 2015, 10:45 PM
2 votes
2 answers
1941 views
How do I add keyboard shortcuts in SSMS 2012 to run a specific query?
How do I add keyboard shortcuts in SSMS 2012 to select all the data from table? In SSMS 2008 we could assign a shortcut in the following way: > TOOLS-->OPTIONS-->ENVIRONMENT-->KEYBOARD--->CTRL+3-->Select * from This doesn't appear to be possible in SSMS 2012.
How do I add keyboard shortcuts in SSMS 2012 to select all the data from table? In SSMS 2008 we could assign a shortcut in the following way: > TOOLS-->OPTIONS-->ENVIRONMENT-->KEYBOARD--->CTRL+3-->Select * from This doesn't appear to be possible in SSMS 2012.
Dhinesh (21 rep)
Feb 20, 2015, 11:09 AM • Last activity: Feb 20, 2015, 03:16 PM
Showing page 1 of 14 total questions