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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does (+) mean in sql joins?

739


column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.

6597


Is left join faster than join?

762


What are tables in sql?

738


what are the limitations of identity column? : Transact sql

822






How does sql store data?

663


What is the difference between truncate and drop statements?

766


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

870


How do I run a pl sql program?

802


Can we use rowid as primary key?

738


How can you tell the difference between an index and a view?

690


what is commit? : Sql dba

818


what is table? : Sql dba

767


How long does it take to learn pl sql?

794


What is a unique constraint?

811