Findout the Least Null Values column and print out that column records ?

I `ve 1 table with 3 colums A,B,C
A B C
1 3 5
4 null 6
8 2 null
null 1 null
null null 9
5 null 6
3 5 7
null null 3

Showing Answers 1 - 2 of 2 Answers

vinay

  • Feb 16th, 2016
 

It should print out null 1 nll

  Was this answer useful?  Yes

Paurian

  • Feb 16th, 2016
 

A surprise to me, using CASE statements was slightly faster, and had the exact same execution plan. People would prefer this code over the SUM( ISNULL( ... ) ) answer because the intent is more clearly understood with "CASE WHEN A IS NULL ..."

Code
  1.  

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions