what will be the output:
select 1 from emp
union all
select 2 from emp;

Answers were Sorted based on User's Feedback



what will be the output: select 1 from emp union all select 2 from emp;..

Answer / m.m

1 will be printed as many times as the number of rows in
emp table
followed by 2 begin printed as many times as the number of
rows in emp table
OP:
1
----------
1
1
1
1
1
1
1
1
1
1
1

1
----------
1
1
1
2
2
2
2
2
2
2
2

1
----------
2
2
2
2
2
2

28 rows selected.

Is This Answer Correct ?    22 Yes 6 No

what will be the output: select 1 from emp union all select 2 from emp;..

Answer / ankush

it returns the number 1 same number columns as well as
union with the value 2 again with the same number of
columns the table emp have.

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More SQL PLSQL Interview Questions

Is there a way to automate sql execution from the command-line, batch job or shell script?

0 Answers  


What is primary key and unique key?

0 Answers  


Main diff between varray and nested tablea

3 Answers   Polaris, TCS,


what is foreign key? : Sql dba

0 Answers  


Can I create table without primary key?

0 Answers  






What is an inner join sql?

0 Answers  


What are the two virtual tables available at the time of database trigger execution?

0 Answers  


What are the differences between in and exists clause?

0 Answers  


What is foreign key sql?

0 Answers  


What is Histogram?

0 Answers   NIIT,


how instead of triger is helpful for mutating tables errors handlling ?

2 Answers   Oracle,


Why is sql important?

0 Answers  


Categories