Write the sql query using dual table for below output?
1 L R
--- --- ----
1 1 1
1 2 1
1 3 1
1 1 2
1 2 2
1 3 2
1 1 3
1 2 3
1 3 3
Write a query using only Dual table with out writing any pl/sql program.
Answers were Sorted based on User's Feedback
Answer / abilash reddy
SELECT 1, L, R FROM (SELECT LEVEL R FROM DUAL CONNECT BY LEVEL<=3), (SELECT LEVEL L FROM DUAL CONNECT BY LEVEL<=3);
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / shailesh
select 1 as "1", decode(mod(level,3), 0, 3, mod(level,3))as l,
case
when level<=3 then 1
when level>3 and level <7 then 2
else
3
end as r
from dual connect by level<10;
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / mani
WITH a as (SELECT level L from DUAL CONNECT BY level <=3)
SELECT 1, L, R
FROM (SELECT level R from DUAL CONNECT BY level <=3) b
CROSS JOIN a;
| Is This Answer Correct ? | 3 Yes | 0 No |
Does a user_objects view have an entry for a trigger?
what are the t string functions available in tsql? : Transact sql
Explain what is dbms?
Explain spool.
Which version of sql do I have?
What are the types of queries in sql?
How to install oracle sql developer?
Name some usages of database trigger?
How packaged procedures and functions are called from the following?
does sql support programming? : Sql dba
Write a pl/sql script to display the following series of numbers: 99,96,93……9,6,3?
How do I save the results of sql query in a file?
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)