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

Can you upgrade sql express to full sql?

713


What is left inner join in sql?

727


Can we use ddl statements in stored procedure?

887


Write a unique difference between a function and a stored procedure.

723


What is clustered index in sql?

787






What type of database is sql?

778


How many indexes can be created on a table in sql?

687


what is an extent ? : Sql dba

753


Can we perform dml in function?

798


What normalization means?

710


Can you join views in sql?

723


What is foreign key and example?

708


Is nosql faster than sql?

750


What are triggers in sql?

755


What are different sql data types?

685