如何删除日期? (sqlite3)

huangapple go评论56阅读模式
英文:

How to delete the dates? (sqlite3)

问题

分析:
用户想要删除数据库中所有日期中的“26”这一天的记录。

想法:
用户尝试使用SQL语句来执行这个操作,但代码中存在问题。

推测:
需要更正SQL语句以正确执行删除操作。

汉化后的代码:无需汉化。

英文:

This is my data base

I want to delete all the dates with day 26, for example
But code like this doesn't work:

CURSOR.execute(f"SELECT * FROM {name}_schedule WHERE date == {date}")

I do not know sql at all, so idk what to do :c

答案1

得分: 0

分析:
您需要翻译以下SQL查询语句中的注释部分。

想法:
您需要将以下内容翻译为中文。

推测:
您需要将以下内容翻译为中文。

汉化后的代码:不适用。

英文:

The sql could be something like this

DELETE FROM table_name WHERE strftime('%d', date_column) = '26'

huangapple
  • 本文由 发表于 2023年7月28日 03:54:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76783002.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定