Short cut key

  • bitbucket: I declare you :w00t:"guilty" :w00t: of not reading this thread! 😉

    As stated by me and others before you have to be in a query window for this to work.

    You have to highlight the text of the object name and then press Alt+F1.

    Its a bad question maybe when we get to 15/08/2008 the poster will have corrected it 😀

    or better yet taken it down and reconsidered the whole concept.:D

    :D:D:D:D:D

    --Shaun

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • bitbucket (7/15/2008)


    Hari.Sharma

    Just select a table name and press Alt+F1 and see the result...

    Using SSMS (SQL Express) pressed f8 to bring up object explorer. Selected a database (Northwind), then selected a table name in the object explorer window pressed Alt+F1, and nothing absolutely nothing happend

    Using SSMS (Developer Edition) repeated above key strokes and nothing absolutely nothing happend

    You have to have a query window open, and it must have the focus. You will get the sp_help results for the database of the selected object in Object Explorer.

    Highlighting an object name that is spelled out in the query window will return sp_help for the object when the shortcut is used.

    Tom Garth
    Vertical Solutions[/url]

    "There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
  • I have tried this with my Management Studio 2005.I select a table and then press alt + f1.It brings absolutely nothing.

    what may the reason!

  • I just tried this, and Alt+F1 did absolutely nothing that I could see in Management Studio. If it runs sp_help, it did so invisibly.

    (Does this mean I have to wait till the date of the question for this to work? 🙂 )

    Edit: I just checked the article linked to, and it does not seem to have Alt+F1 in it. I searched for that string in the page, and it comes up with Ctrl+Alt+F1 (which does stuff in BOL), but nothing about Alt+F1.

    The Tools\Options window in Management Studio says that Alt+F1 runs sp_help. I tried a few options. If I select an object in the object explorer window, it does absolutely nothing. If I open a connection to a specific database, make sure that the connection's window has the focus, and then hit Alt+F1, it will run sp_help for the database, but not for a proc that I have selected in the object explorer window.

    So, yeah, it will do what the question says. Sort of. Under limited circumstances. And not in a particularly useful fashion. But it does do it.

    Others have found the same thing, obviously.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Cool. I like it. I'll be using this frequently to quickly double check column types or foreign keys while writing scripts. Very handy, thanks!

    Thanks,

    Chad

  • OK, I accidentally marked this as published instead of pending. I'll remove all answers, and you can re-do this one on the 15th.

    I guess it made sense to me. I just brought up a query window and tried it, but I can see why you would think that it was an Object Explorer thing. I'll reword the question.

  • I did try it. Even though the keyboard had defaults setting. I hope the attached details does show the difference. Keyboard shortcuts can be customised and I usually change the defaults to my liking however, I had reverted to default setting before trying it.

  • Jamie Longstreet (7/16/2008)


    I was recently at a SQL Server Users Group where some of the users had never seen that you can highlight a portion of text and run it. I was shocked because I learned it early on. Maybe the problem with the question is that not everyone instantly jumps into the SQL Manager, pastes code and runs with it.

    :crazy:Thats wild!:crazy:

    You mean people didn't read the book/readme.txt/(fxxxing) manual/wiki/knowledge base/help... 😀 previous posts 😀 ...?

    Now why am I not shocked? 😀

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • I only answered this so I could jump a month into the future and thus be on holiday.

    ---------------------------------------------------------------------

  • george sibbald (7/16/2008)


    I only answered this so I could jump a month into the future and thus be on holiday.

    Me too 🙂



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • GSquared (7/15/2008)


    The Tools\Options window in Management Studio says that Alt+F1 runs sp_help. I tried a few options. If I select an object in the object explorer window, it does absolutely nothing. If I open a connection to a specific database, make sure that the connection's window has the focus, and then hit Alt+F1, it will run sp_help for the database, but not for a proc that I have selected in the object explorer window.

    So, yeah, it will do what the question says. Sort of. Under limited circumstances. And not in a particularly useful fashion. But it does do it.

    Others have found the same thing, obviously.

    I also noticed that: it's looking for objects it can see using the query window connection, not those selected on the object explorer...

    Anyway it's a nice trick to know, even if I answered it the wrong way this QOTD 😀

  • Sure I was surprised with date on the QOD. Is there any specific reason for this?

  • I wonder what will happen when August 15th comes around :D.

  • It will just be SSDD 😀

    Hiding under a desk from SSIS Implemenation Work :crazy:

  • This seems to be configuration specific. I don't know who originally set up my SQL Server Management Studio on my PC, but when I am in a query and either highlight the whole query or just the table name in the FROM using Alt+F1, I get a bunch of meta-data on the structure of the table. I get syntax errors highlighting anything else. However, when I highlight something like a function name and use Shift+F1, I am taken to a help screen for the function highlighted. Thus I should get credit for answering Shift+F1, except that as I said it must be configuration specific and highly modifiable from one machine to another.

    What is really weird about this is I just went into my Tools-options page and saw that my keyboard settings for the Alt+F1 key are still set to "sp-help", with no other settings for Shift+F1. It seems something somewhere else is over riding the Tools Options Keyboard settings in Management Studio . . . hmmmm!

    Ron K.

    "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -- Martin Fowler

Viewing 15 posts - 31 through 45 (of 51 total)

You must be logged in to reply to this topic. Login to reply