• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

meaning of

create table t nologging as select rownum t1,rownum+1 t2 from dual connect by level<=10000;

I want to know the meaning


rownum t1
rownum+1  t2  

Please tell  me the meaning/
1 Solution
Nologging - prevents the ability to recover the work in the event of a problem.  It should not be used in a production database.

rownum t1 means that the field t1 will contain the row number of the selected record

rownum+1 t2 means that the field t2 will contain the row number plus 1.
Naveen KumarProduction Manager / Application Support ManagerCommented:
all that it is being done is to setup a test/dummy table with 2 columns (10000 records ) in it by using that select .. from dual connect by level <= 10000
"The NOLOGGING clause causes minimal redo information to be generated during the table creation."
see: Consider Using NOLOGGING When Creating Tables

"For each row returned by a query, the ROWNUM pseudocolumn returns a number indicating the order in which Oracle selects the row from a table"
see: ROWNUM Pseudocolumn

rownum t1
the "t1" is an alias so that the returned column can be referenced as "t1"

"t2" is also an alias, for the calculation rownum+1

overall, this is a recursive query producing 10,000 rows containing 2 integers
9999, 10000

No points pl.
jcob_lAuthor Commented:
yes fine
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now