I have one table. The table name is employee. I used below query.
delete department,name,bloodgroup from employee where employeeid=2;
But I am not able to delete this record alone. It is showing error. And I don't want to use update statement.
You can't delete single column entries with the delete SQL command. Only complete rows.
You can use the update command for that:
update employee
set department = null, name = null, bloodgroup = null
where employeeid=2;
DELETE employee WHERE employeeid = 2DELETE FROM employee ...
updatestatement? It's the only way to set specific column values to null