Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我运行一个产品,但帐户过期并用完数据库空间。我将如何删除所有“付费”值设置为 0 的帐户?(帐户到期时,该值设置为 0)。
谢谢!
delete from table where paid=0;
像这样的东西?
DELETE FROM table WHERE paid=0
如果付费栏有一个NULL值怎么办,我想你想把它读为0
NULL
因此Query
Query
DELETE FROM table WHERE COALESCE(paid,0)=0
使用 NULL 工作