09 January 2019
09 January 2019

SQL naming conventions

SQL naming conventions for tables, and all the associated objects such as indexes, constraints, keys and triggers, are important for teamwork. Poorly-named tables and other objects make it difficult to maintain databases. Table names must follow the rules for SQL Server identifiers, and be less than 128 characters. It is possible to force SQL Server to … Read more
12 July 2018
12 July 2018

I’m presenting this year

This year I decided that I wanted to give more back to the community in the way of sharing my (limited) knowledge.  The first thing I did was talk to the folks at Redgate and started blogging.  I haven’t presented a session for a while because I’m usually too busy organising events but I decided … Read more
09 July 2018
09 July 2018

T-SQL Tuesday #104: Code You Would Hate To Live Without (Relative Positioning in Date Table)

Today’s blog post is in response to Bert Wagner’s invitation here: https://bertwagner.com/2018/07/03/code-youd-hate-to-live-without-t-sql-tuesday-104-invitation/. For me, the answer was pretty simple. There is one piece of code that I have written that I find very useful, and even more… it was my (as far as I know, my own idea!)  In my life, I have obviously learned a … Read more
08 April 2018
08 April 2018

SQL Code Smells

Some time ago, Phil Factor wrote his booklet 'SQL Code Smells', collecting together a whole range of SQL Coding practices that could be considered to indicate the need for a review of the code. It was published as 119 code smells, even though there were 120 of them at the time. Phil Factor has continued to collect them and the current state of the art is reflected in this article. SQL Prompt is committed to cover as many as possible of them. Phil has also updated his book which you can download here.… Read more
21 October 2016
21 October 2016

Reading, Writing, and Creating SQL Server Extended Properties

There is a great gulf between wanting to document your database properly with extended properties and actually doing it. Extended Properties have many uses but they aren't easy to use. Phil Factor is on a mission to make it easier for ordinary mortals to use extended properties as intended, to aid the database development process.… Read more
24 September 2015
24 September 2015

Dependencies and References in SQL Server

It is important for developers and DBAs to be able to determine the interdependencies of any database object. Perhaps you need to work out what process is accessing that view you want to alter, or maybe find out whether that table-type you wish to change is being used. What are all these dependencies? How do you work out which are relevant? Phil Factor explains.… Read more
01 September 2011
01 September 2011

Temporary Tables in SQL Server

Temporary tables are used by every DB developer, but they're not likely to be too adventurous with their use, or exploit all their advantages. They can improve your code's performance and maintainability, but can be the source of grief to both developer and DBA if things go wrong and a process grinds away inexorably slowly. We asked Phil for advice, thinking that it would be a simple explanation.… Read more