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 max(col) from
select id, col from @t
unpivot (col for cols in (col1,col2,col3)) as unpivott
) as p
group by id

 Posted by Rajnilari2015 on 11/28/2015 | Category: Sql Server Interview questions | Views: 1868 | Points: 40
Select from following answers:
  1. This will generate the maximum values of columns at individual rows
  2. Query will not execute
  3. This will generate the manimum 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