Michael Coles


SQLServerCentral Article

Four Rules for NULLs

In SQL Server 2000 or any relational database, the concept of NULL can be both confusing and hazardess to your employment. Not understanding how to work with NULLs can lead to incorrect responses to queries and poor business decisions being made. New author Michael Coles brings us four rules that can help you work with NULL values in your tables.

4.9 (99)

You rated this post out of 5. Change rating

2008-03-28 (first published: )

94,852 reads

SQLServerCentral Article

Updated SQL Injection

SQL injection has been a hot topic the last couple years and there are some great articles at SQLServerCentral.com on this topic. Michael Coles brings us an updated look at this SQL Server security issue with some new examples you might not have previously thought.

4.03 (30)

You rated this post out of 5. Change rating

2008-03-21 (first published: )

85,057 reads

SQLServerCentral Article

NULL Versus NULL?

Dealing with NULL data is something that often confuses new SQL Server developers, but even experienced DBAs might not understand all the intricacies of NULL operations. In a follow up to his highly acclaimed Four Rules of Null article, Michael Coles brings us a few new
tricks with NULLs.

4.74 (81)

You rated this post out of 5. Change rating

2008-01-25 (first published: )

39,191 reads

SQLServerCentral Article

SQL 2005: Enter XML

SQL Server 2005 has greatly expanded the capabilities of SQL Server in many different areas. One of those that has matured greatly is the integration of XML data inside SQL Server. Longtime writer and guru Michael Coles brings us the first part of a two part series on XML ion SLQ Server 2005.

5 (3)

You rated this post out of 5. Change rating

2008-01-24 (first published: )

13,189 reads

SQLServerCentral Article

SQL 2005 Symmetric Encryption

One of the more interesting new features with SQL Server 2005 is the native encryption built into the product. Expert SQL crpytographer, Michael Coles, brings us a look at the symmetric keys in SQL Server 2005 and how they can be used to encrypt data and be secured by a certificate.

4.75 (16)

You rated this post out of 5. Change rating

2007-08-24 (first published: )

54,540 reads

SQLServerCentral Article

Sic Semper NULL

The great debate over NULLs will probably never end. Should we use them in our databases? What meaning do they have? These are all
valid questions. In this article SQL Server expert Michael Coles takes a look at the problems that are inherent in eliminating NULLs completely from
a database.

5 (2)

You rated this post out of 5. Change rating

2007-04-10

5,979 reads

Blogs

The Book of Redgate: We Value Teams

By

This value is something that I still hear today: our best work is done...

Troubleshooting TempDB Log Full Errors When SSMS Won’t Connect

By

Have you ever received the dreaded error from SQL Server that the TempDB log...

Accelerating AI with Confidence: Why Microsoft Purview is Key to Responsible Innovation

By

Artificial intelligence is no longer a distant concept. It is here, embedded in the...

Read the latest Blogs

Forums

Is there a way for SP to know who called it?

By water490

Hi everyone I am writing an SP where there is logic inside the SP...

Planning for tomorrow, today - database migrations

By John Martin

Comments posted to this topic are about the item Planning for tomorrow, today -...

Bottlenecks on SQL Server performance

By runarlan

We have a BI-application that connects to input tables on a SQL Server 2022...

Visit the forum

Question of the Day

The Tightly Linked View

I try to run this code on SQL Server 2022. All the objects exist in the database.

CREATE OR ALTER VIEW OrderShipping
AS
SELECT cl.CityNameID,
       cl.CityName,
       o.OrderID,
       o.Customer,
       o.OrderDate,
       o.CustomerID,
       o.cityId
 FROM dbo.CityList AS cl
 INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID
GO
CREATE OR ALTER FUNCTION GetShipCityForOrder
(
    @OrderID INT
)
RETURNS VARCHAR(50)
WITH SCHEMABINDING
AS
BEGIN
    DECLARE @city VARCHAR(50);
    SELECT @city = os.CityName
    FROM dbo.OrderShipping AS os
    WHERE os.OrderID = @OrderID;
    RETURN @city;
END;
go
What is the result?

See possible answers