Shortcut to avoid typing something

  • I am going to try this feature already integrated with SQL Server 2008.....it is not long before we upgrade.....and wait for the next one....hehehehe....

    Chandrachurh Ghosh
    DBA – MS SQL Server
    Ericsson India Global Services Limited
    Quality is not an act, it is a habit.

  • I never 'select *'; whenever I want the complete contents I right click the table name and pick 'open table'. This has the added benefit of the easy 'stop' button to halt loading large tables and thus also makes a good lazy typist's 'select top n'.

  • magarity kerns (5/2/2008)


    I never 'select *'; whenever I want the complete contents I right click the table name and pick 'open table'. This has the added benefit of the easy 'stop' button to halt loading large tables and thus also makes a good lazy typist's 'select top n'.

    I sometimes do the same, but not with production data. 'Opening' the table opens the table for editing. Locks are aplied, etc.

    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
  • Ah, well, what do I know? I'm just an ETL guy with access to the DEV databases!

  • Hi All,

    One possible sol'n

    Step 1-

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

    create procedure SelectFrom (@tableName as varchar(100))

    as

    declare @sql varchar(200)

    set @sql = 'Select top 100 * from ' + @tableName

    exec(@sql)

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

    Step 2

    Tools> Options > Environment > Keyboard > Assign "SelectFrom" to any key.

    Step 3

    Open a new Query window

    type a table name like EMPMST, select it and press the key combination

    it will work.

Viewing 5 posts - 16 through 19 (of 19 total)

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