尝试搜索db(sqlite)中的列并用任何内容替换特定的数值

时间:2022-09-08 07:40:57

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.

我试图在我的数据库中搜索表操作并删除代码列中值为40的任何值。

I have tried:

我努力了:

REPLACE (code,40,'') 
FROM actions 

but no luck. Also tried the DELETE function.

但没有运气。还尝试了DELETE功能。

1 个解决方案

#1


3  

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

#1


3  

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