tags:

views:

60

answers:

2

What is a level pseudo column in Oracle, Can anyone explain me in this?

A: 
    SELECT LEVEL N
      FROM DUAL
CONNECT BY LEVEL < 76;

The previous statement generates all the integers starting from 1 and ending to 75. It uses the LEVEL pseudocolumn.

The chicken in the kitchen
true, but not very relevant to the question...
Jeffrey Kemp
+5  A: 

You use LEVEL with the SELECT CONNECT BY statement to organize rows from a database table into a tree structure. LEVEL returns the level number of a node in a tree structure. The root is level 1, children of the root are level 2, grandchildren are level 3, and so on.

In the START WITH clause, you specify a condition that identifies the root of the tree. You specify the direction in which the query walks the tree (down from the root or up from the branches) with the PRIOR operator.

gmagana