Home » SQL & PL/SQL » SQL & PL/SQL » Identity columns
Identity columns [message #295417] Tue, 22 January 2008 05:19 Go to next message
khresmoi
Messages: 24
Registered: October 2007
Junior Member
Hi!
i've a table xyz which has an identity column named CL_ID. Suppose the value for that column goes on like 10,20,30,40,50 etc... If I delete the record with CL_ID=30, then the rest of the values will remain as they are, right? I mean if youquery for values of CL_ID result will be
10
20
40
50
...

Pls help..

TIA
Re: Identity columns [message #295418 is a reply to message #295417] Tue, 22 January 2008 05:20 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Have you tried it? What happened?
Re: Identity columns [message #295420 is a reply to message #295418] Tue, 22 January 2008 05:22 Go to previous messageGo to next message
khresmoi
Messages: 24
Registered: October 2007
Junior Member
I would have tried, but right now, there are some access related issues, so i cant log on.. but i need to give an answer soon.. that's y.. Sorry for troubling you guys..
Re: Identity columns [message #295429 is a reply to message #295420] Tue, 22 January 2008 05:32 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
This sounds like a test question or an interview question, am I right?
Re: Identity columns [message #295436 is a reply to message #295429] Tue, 22 January 2008 05:46 Go to previous messageGo to next message
khresmoi
Messages: 24
Registered: October 2007
Junior Member
Smile No test, no interview.. I'm the person in my team who has got DB knowledge. I'm very new to Rdb.This question came from a team mate. i checked the documentation available in the net, it tells about the truncate scenario but nothing about deletes.
Re: Identity columns [message #295440 is a reply to message #295436] Tue, 22 January 2008 05:55 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
khresmoi wrote on Tue, 22 January 2008 11:46
Smile i checked the documentation available in the net, it tells about the truncate scenario but nothing about deletes.

Then you didn't check the correct documentation.
try here

You say that
Quote:
I'm the person in my team who has got DB knowledge.

then contradict that with
Quote:
I'm very new to Rdb.

Do you mean that you are very new to Oracle? or You are very new to Relational DataBases (Rdb)
Finally, if no-one can get into the db, why is that question urgent? I would have thought that the solution to the connection problems would have been of greater importance?

[Updated on: Tue, 22 January 2008 05:55]

Report message to a moderator

Re: Identity columns [message #295442 is a reply to message #295417] Tue, 22 January 2008 05:56 Go to previous messageGo to next message
ramanajv1968
Messages: 168
Registered: December 2005
Location: HYDERABAD
Senior Member
If I delete the record with CL_ID=30

Yes, the rest of the values will remain as they are.
Re: Identity columns [message #295475 is a reply to message #295442] Tue, 22 January 2008 07:17 Go to previous messageGo to next message
khresmoi
Messages: 24
Registered: October 2007
Junior Member
Thanks ramanaj. that was really helpful.

@pablolee... thanx for the link to the web page on delete which contained basic things which even fresher will know.
By Rbd i meant the oracle Rdb which is product from Oracle and not Relational DataBases. And, deciding priority of an issue is something internal to the team, which i dont think should bother you. Next time if you think someone's post doesn't deserve your time pls just leave it alone than asking background information on that which might turn out to be good for no one.
Re: Identity columns [message #295535 is a reply to message #295475] Tue, 22 January 2008 11:00 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Quote:
thanx for the link to the web page on delete which contained basic things which even fresher will know.
You clearly didn't. The fact that you couldn't find any information about the delete statement, quite frankly beggars belief nearly as much as someone claiming to be
Quote:
the person in my team who has got DB knowledge.
Who doesn't understand even the most basic concepts of DML (i.e. will my data in other rows change when I delete a row?) Your team might want to get you on some basic training.
Quote:
By Rbd i meant the oracle Rdb which is product from Oracle and not Relational DataBases
Fair play, but the level of your question required clarification on that point.
Quote:
nd, deciding priority of an issue is something internal to the team, which i dont think should bother you.
It didn't bother me at all. Not remotely. I couldn't care less about you or your team.
Quote:
Next time if you think someone's post doesn't deserve your time pls just leave it alone than asking background information on that which might turn out to be good for no one.

If i deign to reply to a post, I have every right to ask whatever questions I deem pertinent. You don't like it? Tough.

And I see that you STILL haven't learned the common courtesy to avoid the use of iM speak.

[Updated on: Tue, 22 January 2008 11:17]

Report message to a moderator

Re: Identity columns [message #295658 is a reply to message #295417] Wed, 23 January 2008 00:45 Go to previous messageGo to next message
khresmoi
Messages: 24
Registered: October 2007
Junior Member
I doubt if you really read the question I posted. It was NOT about the DML operation delete, it was about delete happening to and identity columns, a feature of Oracle Rdb as given in the subject line.
Moreover i had cleared written 'Rdb' 'product/version' field. May be you should get some basic training in reading and comprehension.



Re: Identity columns [message #295763 is a reply to message #295658] Wed, 23 January 2008 06:18 Go to previous message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Are you talking about these identity columns?

As identity columns uniquely identify every row in the table and are made up of values generated by the database (in an Oracle database, a common way to do that is to use a sequence), values that are once stored into a column remain the same. It doesn't matter if you delete any of these records - values of remaining records will not change unless there's, for example, a database trigger which will "re-sequence" these values. Such a job shouldn't be done (in my opinion), so - I believe that @ramanajv1968's answer is true in vast majority of such cases.
Previous Topic: how to create a table within a procedure
Next Topic: Creating a Table and then match the field against a table (merged)
Goto Forum:
  


Current Time: Sat Dec 03 10:15:38 CST 2016

Total time taken to generate the page: 0.04599 seconds