How did I not already know this?
By December 20, 2022
onFrom time to time I come across tricks that can help make my life easier and I just have to wonder how I didn’t know about the trick sooner. This is one of those times.
Tools -> Options -> Keyboard -> Query Shortcuts
DROP TABLE IF EXISTS Test CREATE TABLE Test ( Col1 uniqueidentifier , Col2 datetime ) GO INSERT INTO Test ( Col1 , Col2 ) VALUES ( NEWID() , GetDate() ) GO 10 SELECT * FROM Test
Being able to add commonly used query stubs as a shortcut I can cut down on typing and I find it rather handy when debugging as I can just pull sample data from tables within an existing script without having to break it out from the script.
Categorised in: Blog