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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is online transaction processing (oltp)?

605


What is sqlite used for?

533


What is snowflake sql?

582


Is sqlexception checked or unchecked?

541


What is sql integrity?

585






What is a field in a database?

570


How do I clear the screen in sql plus?

553


Can we rename a column in the output of sql query?

543


what does it mean to have quoted_identifier on? : Sql dba

679


how to shutdown mysql server? : Sql dba

570


what is the difference between truncate and delete statement? : Transact sql

550


Is stored procedure faster than query?

564


What is hibernate and its relation to sql?

594


How to display the current date in sql?

601


What is the difference between explicit and implicit cursors in oracle?

516