What is the output of

Declare @t table(id int identity, col1 int, col2 int, col3 int, col4 int, col5 int)
insert into @t values(23,33,44,55,66),(101,11,304,55,6),(7,3,5,9,1),(4,5,3,6,7),(1,2,3,4,5)

select
(
select max(n) from
(
values(col1),(col2),(col3),(col4),(col5)
) as t(n)
)
from @t

 Posted by Rajnilari2015 on 11/28/2015 | Category: Sql Server Interview questions | Views: 1809 | Points: 40
Select from following answers:
  1. Maximum values of columns at individual rows
  2. The query won't execute
  3. Minimum values of columns at individual rows
  4. Invalid syntax
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response