Reputation: 1
How to delete the attributes value of a table in oracle 10g using sql command?
Example of problem like: Delete the email_id of employee James.-> I tried this code
DELETE FROM EMPLOYEE01 WHERE MAIL_ID= '[email protected]'
but after run output showed me that entire row was deleted but I want only email id delete from particular row.
Upvotes: 0
Views: 207
Reputation: 18061
If you only want to update a row, use UPDATE
:
UPDATE EMPLOYEE01
SET MAIL_ID = NULL
WHERE MAIL_ID = '[email protected]'
Here, SET MAIL_ID = NULL
will remove the value from MAIL_ID
field for the record identified by the WHERE
clause.
Upvotes: 2