Home » SQL & PL/SQL » SQL & PL/SQL » Delete (Oracle 10g Express Edition, Vista)
Delete [message #444443] Mon, 22 February 2010 00:50 Go to next message
sivavignesh
Messages: 12
Registered: February 2010
Location: Chennai
Junior Member

How to delete one particular field value in a row?

Constraint: There should be no null value or zero instead of deleted value. Other values remain unchanged.
Re: Delete [message #444446 is a reply to message #444443] Mon, 22 February 2010 01:14 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
Quote:

How to delete one particular field value in a row?

Constraint: There should be no null value or zero instead of deleted value. Other values remain unchanged.




In short, Not possible.Please Read the Orcle documentation for DELETE.

DELETE FROM TEST WHERE EMPID = 1;

to delete the entire row.


If you are saying something like 'DELETE A PARTICULAR COLUMN VALUE FOR THE SPECIFIC ROW' then you CAN NOT DO DELETE ON PARTICULAR COLUMN VALUE

You can of course set the column value for the specific records to NULL.Just update the value.



Regards,
Ved

[Updated on: Mon, 22 February 2010 01:19]

Report message to a moderator

Re: Delete [message #444448 is a reply to message #444443] Mon, 22 February 2010 01:16 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So what do you mean by "delete one particular field value in a row"?

Regards
Michel
Re: Delete [message #444450 is a reply to message #444443] Mon, 22 February 2010 01:26 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
sivavignesh wrote on Mon, 22 February 2010 07:50
How to delete one particular field value in a row?

Constraint: There should be no null value or zero instead of deleted value. Other values remain unchanged.

"Deleting" a column value means updating it to null.
Re: Delete [message #444451 is a reply to message #444450] Mon, 22 February 2010 01:49 Go to previous messageGo to next message
sivavignesh
Messages: 12
Registered: February 2010
Location: Chennai
Junior Member

I told that there should be no null value instead of deleted value. That field should left as blank. This is the constraint that I've mentioned in the question.

Is there any possibilities to do like so?
Re: Delete [message #444452 is a reply to message #444451] Mon, 22 February 2010 01:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What do you mean with "blank"?

Regards
Michel
Re: Delete [message #444453 is a reply to message #444451] Mon, 22 February 2010 01:55 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
Quote:

I told that there should be no null value instead of deleted value. That field should left as blank. This is the constraint that I've mentioned in the question.

Smile Update the column value to null
Re: Delete [message #444455 is a reply to message #444452] Mon, 22 February 2010 01:57 Go to previous messageGo to next message
sivavignesh
Messages: 12
Registered: February 2010
Location: Chennai
Junior Member

Yes, It should be left as blank. Is that possible?
Re: Delete [message #444456 is a reply to message #444453] Mon, 22 February 2010 01:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Its_me_ved wrote on Mon, 22 February 2010 08:55
Quote:

I told that there should be no null value instead of deleted value. That field should left as blank. This is the constraint that I've mentioned in the question.

Smile Update the column value to null

Still a stupid reply! you'd better stay where you were these last 2 weeks.

Regards
Michel
Re: Delete [message #444457 is a reply to message #444453] Mon, 22 February 2010 01:58 Go to previous messageGo to next message
sivavignesh
Messages: 12
Registered: February 2010
Location: Chennai
Junior Member

ok.

Thanks & Regards,
Siva Vignesh..
Re: Delete [message #444458 is a reply to message #444455] Mon, 22 February 2010 02:06 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
If you meant blank by nothing yes you need to update the column to null or otherwise you cant set it to ''
Re: Delete [message #444459 is a reply to message #444455] Mon, 22 February 2010 02:12 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
sivavignesh wrote on Mon, 22 February 2010 08:57
Yes, It should be left as blank. Is that possible?

What do you mean by "blank" if it is not "null"?

Regards
Michel

Re: Delete [message #444462 is a reply to message #444451] Mon, 22 February 2010 02:35 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
sivavignesh wrote on Mon, 22 February 2010 08:49
I told that there should be no null value instead of deleted value. That field should left as blank. This is the constraint that I've mentioned in the question.

Is there any possibilities to do like so?

And I just told you that blank == null in Oracle terms.
Re: Delete [message #444464 is a reply to message #444443] Mon, 22 February 2010 02:40 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
What ever the replies you have ...are well answered.
What do you mean by those terms "blank" ANd why you want to performthat why type of data type you have for that column?
blank =="space"?

sriram Smile
Re: Delete [message #444472 is a reply to message #444456] Mon, 22 February 2010 03:17 Go to previous message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
@OP,
Its better if you post what you did with test case or what problem you had when you update the value to null.

To avoid more follow ups you should put some test case stating what you want.

If you update the value to null (for a particular value) you will not see anything( appears blank..is that what you want to mean????)

NULL means nothing, undetermined
and if you consider blank as a character then put ' ' (space)
When you query you wont see anything when you view the output
in sqlplus.

But lenth(col1) for the particular value you are updating will be when you put ' ' WILL BE 1.
As frank already pointed out,
Quote:

And I just told you that blank == null in Oracle terms.



@Michel,
Quote:

Its_me_ved wrote on Mon, 22 February 2010 08:55

Quote:


I told that there should be no null value instead of deleted value. That field should left as blank. This is the constraint that I've mentioned in the question.


Smile Update the column value to null


Still a stupid reply! you'd better stay where you were these last 2 weeks.



I asked the OP to Update the column value to null. I dont know what was wrong there.YOU SHOULD READ MY FIRST POST HERE..

Sorry I preferred to ignore you!!!!


Thanks










[Updated on: Mon, 22 February 2010 04:15]

Report message to a moderator

Previous Topic: How to get left padded sequence values in pl/sql variable to insert it in table for ID creation (mer
Next Topic: JSP limitations
Goto Forum:
  


Current Time: Fri Dec 09 15:11:12 CST 2016

Total time taken to generate the page: 0.40114 seconds