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

What is structural independence and why is it important?

0 Answers  


How many types of sql are there?

0 Answers  


counting the no.of characters occurs in a string by using pl/sql function

1 Answers   TCS,


what is d diff between grant,commit,rollback n savepoint

1 Answers  


Explain what is sql*plus?

0 Answers  






Why is a primary key important?

0 Answers  


Is a view faster than a stored procedure?

0 Answers  


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

0 Answers  


What is sql lookup?

0 Answers  


Why indexing is needed?

0 Answers  


Can we insert in view in sql?

0 Answers  


How can u find column name from a table which have max value in a row.( not max value)

5 Answers  


Categories