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.

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between alter trigger and drop trigger statements?

1109


Explain exception handling in pl/sql?

1036


i have some prob lem to tell me about my self in interview first round ...

2163


What language is oracle sql developer?

1018


What are the different operators available in sql?

1000


What is #table in sql?

1099


what is 'mysqlshow'? : Sql dba

1026


What is nosql db?

970


What is function and procedure in pl sql?

1044


Define tables and fields in a database

1130


Why do we use procedures in sql?

1083


Define sql delete statement.

1014


explain commit and rollback in mysql : sql dba

1016


what happens if null values are involved in expressions? : Sql dba

1045


What are the benefits of pl sql?

1121