Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

Trick in SQL Server 2012 Shift+Alt+Selection

Aug 13 2012 12:00AM by abhIShek BandI   

In SQL Server 2008, We have a feature to select multiple lines with specific characters. In SQL Server 2012, we can append the same text to multiple lines. Below images will give the clear picture to understand this feature.

Some times we need to add same text to multiple lines in the query window. In the below image i have 1 to 6 and i want to append "SELECT " to all the characters. For that we need to place cursor left side of 1 and Press Shift+Alt , then click the mouse pointer left side of 6 as shown below.

alt text

Next Type "SELECT "

alt text

Move your cursor to right side of 1 and Press Shift+Alt and click your mouse pointer right side of 5 and type "UNION ALL"

alt text

alt text

alt text

The above feature is available in SQL Server 2012 only.

If we want we can select the characters too..

alt text

Place your cursor for start point, and Press Shift+Alt and Select the End point. we can delete the selected text in SQL 2008/2012. But we can append/Change the Text only in SQL Server 2012

Hope this is useful.

Thanks, abhIShek BandI

Read More..   [32134 clicks]

Published under: SQL Server Tips ·  ·  ·  · 


abhIShek BandI
104 · 2% · 503
17
 
2
 
16
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

8  Comments  

  • Good tip! SSMS 2012 is more like VS2010.

    commented on Aug 15 2012 1:57AM
    kingkong0924
    86 · 2% · 633
  • In SSMS 2K8 you can also use [Tab], [Delete] and perform clipboard operations after making [Shift] + [Alt] (rectangle) selections in the code editor.

    commented on Aug 15 2012 1:59AM
    oeikli
    730 · 0% · 44
  • I actively use this functionality. In fact, it is available within the Visual Studio shell, meaning that it is available in Visual Studio 2008 (whose shell is used by SQL Server 2008/R2) and Visual Studio 2010 (whose shell is used by SQL Server 2012).

    @kingkong0924: That's because the SSMS inherently leverages the Visual Studio shell (same as BIDS).

    commented on Aug 15 2012 2:41AM
    Nakul Vachhrajani
    4 · 33% · 10564
  • Hei,really great tip...

    commented on Aug 22 2012 10:39AM
    Robert Dennyson
    11 · 14% · 4419
  • @Bogdan Sahlean

    Nice one.

    With your comments, I came to know how to use regular expressions in Find&Replace option in SSMS.

    This one is very useful in SQL 2008.

    Thank you very much.

    commented on Sep 23 2012 10:16AM
    abhIShek BandI
    104 · 2% · 503
  • Gud tip..Thank you very much..

    commented on Nov 6 2012 3:29AM
    Ramkoti
    414 · 0% · 95
  • Hi Abishek,

    Thanks for your tip, really nice one.

    commented on Jan 24 2013 12:42AM
    Bala Krishna
    85 · 2% · 642

Your Comment


Sign Up or Login to post a comment.

"Trick in SQL Server 2012 Shift+Alt+Selection" rated 5 out of 5 by 17 readers
Trick in SQL Server 2012 Shift+Alt+Selection , 5.0 out of 5 based on 17 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]