• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1017
  • Last Modified:

select two rows from dual?

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
dougtimms
Asked:
dougtimms
1 Solution
 
sidcapCommented:
why don't you try using "union" ?

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

SIDCAP.
0
 
jammalkCommented:
U can try this too..!
SQL> select 'Y'||chr(10)||'N' from dual;

'Y'
---
Y
N

Whats the purpose of this.... ?
0
 
dougtimmsAuthor Commented:
Thanks a lot...exactly the answer i was looking for.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now