Sql server scenario

How to get the below output for following table ? can you please clarify this
--------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
--------------------------
100 | null | null | null
--------------------------
null | 200 | null |null
--------------------------
null | null | 300 | null
--------------------------
null | null | null | 400
--------------------------

O/p :
------------------------
| 100 | 200 | 300 | 400 |
------------------------

Questions by Amaleswar

Showing Answers 1 - 3 of 3 Answers

Swapna

  • Apr 21st, 2016
 

SELECT MAX(COL1), MAX(COL2), MAX(COL3),MAX(COL4) FROM TABLE

  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