Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Write the sql query using dual table for below output? 1 L R --- --- ---- 1 1 1 1 2 ..

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

Write the sql query using dual table for below output? 1 L R --- --- ---- 1 1 1 1 2 ..

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

Write the sql query using dual table for below output? 1 L R --- --- ---- 1 1 1 1 2 ..

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

Post New Answer

More SQL PLSQL Interview Questions

Is join same as left join?

0 Answers  


How will you delete a particular row from a Table?

7 Answers   Cap Gemini,


How many types of relationship are there?

0 Answers  


How to get unique records from a table?

0 Answers  


What is difference between a PROCEDURE & FUNCTION ?

6 Answers   Satyam,


how to shut down the server with 'mysqladmin'? : Sql dba

0 Answers  


How to run pl sql program in mysql?

0 Answers  


What is data control language?

0 Answers  


What is nvarchar in sql?

0 Answers  


how to select alphabets in a one column , for this the table name is PA_TASKS and column name is TASK_NUMBER, In TASK_NUMBER the data like this 1.1.3NN,1.1.4NN,1.5.1NN,1.3.2NE,1.5NN,1NN,1.2NE,1CE , For this i need to disply output as NN,NN,NN,NE,NN,NN,NE,CE, Its some urgent requirement ,thanks in advance

6 Answers  


What is sql indexing?

0 Answers  


How do you optimize a stored procedure query?

0 Answers  


Categories