scapegoat17
scapegoat17

Reputation: 5821

Clearing up isNull() with "%" - Sql Server

I am kinda confused what is being call with an isNull. Would anyone be able to explain better what is going on?

WHERE columnName LIKE isNull('something%','%')

Any information would be much appreciated. Thanks!

Upvotes: 0

Views: 51

Answers (1)

Jim V.
Jim V.

Reputation: 2177

SELECT ISNULL(ColumnA,ColumnB) will return ColumnA unless Column A is null, in which case it will return ColumnB. If both values are null, it will return NULL.

Here's an example in SQL Fiddle.

Upvotes: 1

Related Questions