Search
×

Sign up

Use your Facebook account for quick registration

OR

Create a Shvoong account from scratch

Already a Member? Sign In!
×

Sign In

Sign in using your Facebook account

OR

Not a Member? Sign up!
×

Sign up

Use your Facebook account for quick registration

OR

Sign In

Sign in using your Facebook account

Shvoong Home>Internet & Technology>Software>An Extra Bit On Oracle Review

An Extra Bit On Oracle

Website Review   by:khalid raza    
ª
 
For an Extra bit On Oracle, yes you will find a detailed explanation, for now just read the first 5 lines to follow even if you don't understand to begin with don't worry Iam sure you will understand completely what is this extra bit on oracle is; if you finish reading this information with concentration. Well, if there is a situation where you have added additional values for the columns in an oracle table containing 14 rows, and you are repeatedly trying to delete the additional values of the columns, however making them to null, infact it is surprising to see even after deleting that column values when you execute select * from table_name; then always it is shown for example 15 rows selected message at the bottom of the output instead of 14 rows selected message, then use oracle rowid! To know how this problem can be tackled, just read on, moreover it is absolutely funny a null data at the bottom of the column list of the oracle table appears and the bottom line displays the number of the rows selected including the null data row. First let me tell you what is an oracle rowid, an oracle rowid displays the physical location of the row on the disk, these can be logical and physical rowids.In other words rowid contains the address for rows in an oracle table.A simple introduction of oracle that I feel to include is that, oracle is a powerful relational database system, and which lets you define the result through a structured query language, sql. You can communicate with oracle using sql to get the information you need. However it is necessary to have a hands on practice on oracle before having a go on understanding this topic which is based on the solution for a small problem.Let us now create a table of about 14 rows and around six or seven columns insert the data into the columnns using proper create table and insert statements respectively.Offcourse you can insert the data after creating the table.Now execute this simple sql query select * from table_name.
The table name could me anything but do not use any oracle reserved word such as select, from or any table name starting with numbers, also a table name should not contain quotes, you can use $, _, # in the table name, but the $, _, and # marks should not come in the begining of a table name.Coming to the point as you have seen the contents of the table through the query select * from table_name, you just note on the bottom of the output that displays 14 rows selected message.Now add values for the columns of the table using the alter table statement for an additional row and after executing the query select * from table_name you can see the message obviously as 15 rows selected and the point is that you then set the recently added row for example to null for all the values corresponding to the row and the columns, I hope you understand what I mean.Again execute the query select * from table_name you will see 15 rows selected message apearing at the bottom, you now don't want the null row to be counted, but how? you will offcourse try to delete the row with all your atempts surely failing.The conclusion as Iam taking you to the last point, use the most interesting feature of oracle the rowid as I have already discussed about it.Execute the query select rowid from table_name. Note the rowid value for the corresponding row and use this value to delete the row in your table, you will be happy to see that the job is done as 14 rows selected message will appear instead of 15 rows selected message. This is infact a solution you will never find anywhere.
Published: January 13, 2006   
Please Rate this Review : 1 2 3 4 5
Translate Send Link Print
  1. 1. moby

    simply outstanding

    0 Rating Friday, January 13, 2006
X

.