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 is difference between mysql and postgresql?

506


Does a join table need a primary key?

525


What is trigger explain it?

545


What type of database is sql?

613


How do you go back in sql?

526






How does postgresql compare to oracle/db2/ms sql server/informix?

557


Explain select statements in sql?

582


Why do we use procedures in pl sql?

516


what are the 'mysql' command line arguments? : Sql dba

644


What is a heap in sql?

521


How do I create a memory optimized filegroup?

523


What mean sql?

576


What is difference between sql and mysql?

523


Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?

530


What are aggregate functions in sql?

619