Wednesday, October 23, 2013

Interview Question of Day: Union All and Union

For the sake of some stupid questions which can block you selection in interview , we are starting this new series in which there we will publish a questions and you need to provide answers.
Don't run or use sql server for this. give your answer only on the thought process. Publish your answers as comment below the post or Facebook page for this blog.

For below queries what will we the output.

select 1,1
union all
select 1,1
union
select 1,1

GO

select 1,1
union 
select 1,1
union all
select 1,1

1 comment:

  1. is it 1,1 for the first one
    and

    1,1
    1,1 for the second one?

    ReplyDelete