Using Sql Server 2005
Table1
ID Name Value
001 Rajesh 90
002 Suresh 100
003 Mahesh 200
004 Virat 400
...
I want to delete the value from the table1 for the particular id
Tried Query
Delete value from table1 where id = '001'
The above query is not working.
How to make a delete query for delete the particular column
Need Query Help
There are at least two errors with your statement:
tablewill give a syntax error because it is a reserved word. You need to specify the table name of the specific table you wish to delete from.DELETE value FROM. It’s justDELETE FROM. And note that it deletes the entire row, not just a single value.A correct delete statement would look like this:
However if you want to change a single value to NULL you should use an UPDATE statement.
Of course this assumes that the column is nullable. If not, you’ll have to fix that first. See this question for details: