Notes on SQL

Random articles from a puzzled DBA

Well that was fun. Setting up the WordPress account was quite straightforward and there’s plenty of material out there about creating a basic post for it.
However, I wanted to be able to include SQL code that could be copied by anybody reading the article – much friendlier than making them type it back out themselves from a screen-shot.
It took a little bit of hunting and of course there is an article within the numerous WordPress support articles. The trick is to get the correct phrasing through Google.

I have three links to articles on this feature:
So to get the following code to appear in the correct colours and with the facility for it to be copied:
Place the correct tags around the code:


And it will appear as:


Unfortunately, what I can’t find is any way to keep the formatting when using copy/paste into SSMS. Trying that produces the code on one long line. So for now, I’ll just have to try and remember to leave a space at the start of each line. Then at least the code will parse correctly (I’m not promising anything will actually execute correctly!).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: