Solved

select two rows from dual?

Posted on 2001-06-07
3
999 Views
Last Modified: 2007-12-19
ok this seems easy enough, but i havent been able to find a solution.

i want to make a query from the DUAL table that returns two rows of data like this:

DUAL
-----
N
Y


i know that "select 'N' from dual" can give you 1 row, but i want both. and no, i do not want to create a dummy table. i want this to all be on the fly.

0
Comment
Question by:dougtimms
3 Comments
 
LVL 3

Accepted Solution

by:
sidcap earned 50 total points
ID: 6165434
why don't you try using "union" ?

select 'N' from dual union select 'N' from dual

SIDCAP.
0
 
LVL 2

Expert Comment

by:jammalk
ID: 6165469
U can try this too..!
SQL> select 'Y'||chr(10)||'N' from dual;

'Y'
---
Y
N

Whats the purpose of this.... ?
0
 

Author Comment

by:dougtimms
ID: 6165487
Thanks a lot...exactly the answer i was looking for.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now