SQL and the like

Dave Ballantyne's blog. Freelance SQL Server database designer and developer at Clear Sky SQL

Browse by Tags

All Tags » Optimizer » Cache (RSS)
Inconsistent NullIF Behaviour ?
NullIf can be a very handy function sometimes. For those who have not used it, if the result of the two parameters are equal then null is returned. So if we execute : Code Snippet Select nullif ( 10 , 10 ) as Result1 Select nullif ( 10 , 9 ) as Result2...
SQL 101 : Without “ORDER BY”, order is not guaranteed.
It’s as simple as that. If you don’t specify ORDER BY, then the order of your result set is not guaranteed. Oh sure , there may be situations where the data looks like it is being returned ordered, but this is not really the case. So, for example : CREATE...