One of the greatest thing when attending a conference, is that you meet a lot people that instantly understands what you’re talking about. And during some talks and sessions, we tend to share tips and tricks.
One of the better tricks I’ve come across was shared today by Robert Cain ( twitter | blog ) and it’s about to make your life as an t-sql developer a lot easier.
You know sometimes when you have to make a new statement, you right-click the table and create script as select and use that to work further on.
Usually you need to join another table onto that table, so you add an Alias to the table, and then add that alias in front of all the attributes on the SELECT statement.
Go add an alias to the table.
Put your cursor at the last attribute in the select statement.
Click and hold ALT+SHIFT and move you cursor up with the ARROW-UP
See there’s a light blue line now?
Now start typing the alias of the table, and by magic the alias you write is written on all lines selected previous.
And this can also be used for copy pasting.
I bet you this will be the most used little nifty trick – and it works in SSMS 2012 and 2014
One comment
[…] Pass Summit 2014 – Tips & Tricks by Kenneth M Nielsen […]