ImpactGary
ImpactGary

Reputation: 11

Trying to search a column in a db (sqlite) and replace specific numeric values with nothing

I am trying to search the table actions in my database and delete any value within the code column that has the value of 40.

I have tried:

REPLACE (code,40,'') 
FROM actions 

but no luck. Also tried the DELETE function.

Upvotes: 1

Views: 48

Answers (1)

Siyual
Siyual

Reputation: 16917

You're looking for UPDATE:

Update   actions
Set      code = Null
Where    code = 40

If you need to delete the entire row, you can do it with the following:

Delete   
From     actions
Where    code = 40

Upvotes: 3

Related Questions