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 are records give examples?

0 Answers  


How delete a row in sql?

0 Answers  


What is pl sql block structure?

0 Answers  


Which is better stored procedure or query?

0 Answers  


What is numeric function sql?

0 Answers  






Explain the rollback statement?

0 Answers  


i have a customer table. trans_id trans_date trans_amt debit_credit_indicator 001 01-JAN-13 1099 cr 001 12-JAN-13 500 db 002 24-FEB-13 400 db 002 23-MAR-13 345 cr 001 18-APR-13 800 cr 002 15-MAR-13 600 db 001 12-FEB-13 200 cr i want like this output. trans_id trans_amt debit_credit_indicator i want get highest credit amount and lowest credit amount and highest debit amount and lowest debit amount for each trans_id. pls give me answer. i want urgent

3 Answers  


What are sql queries used for?

0 Answers  


which will default fire first  statement level trigger or row level trigger

2 Answers   Cap Gemini, Data Vision,


What is a dirty read sql?

0 Answers  


how to fetch alternate records from a table? : Sql dba

0 Answers  


Where not exists in sql?

0 Answers  


Categories