what will be the output:
select 1 from emp
union all
select 2 from emp;
Answers were Sorted based on User's Feedback
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 |
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 |
How much does sql cost?
Is it possible to sort a column using a column alias?
I want to display the employees who have joined in last two months. (It should be executed randomly means If I execute the query in March it should display Jan and Feb joined employees. Same query if i execute in Feb, 2007 it should display dec, 2006 and jan 2007 joined employees.
What is different between union and minus?
What is recursive stored procedure?
Is pl sql and postgresql same?
How to run sql functions in pl/sql?
What is the difference between database trigger and stored procedure?
using comand prompt how can import table data and table space with example
How to get help at the sql prompt?
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
Do triggers have restrictions on the usage of large datatypes, such as long and long raw?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)