How did I not already know this?

By on December 20, 2022

From 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:

Leave a Reply

Your email address will not be published.

Subscribe

Want occasional notes from me?
(I promise, no spam.)

* indicates required

© Copyright 2024 The Data You Need. All rights reserved. Privacy Policy Cookie Policy