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.
这个查询我重建
SELECT time('now','+30 minutes')
到一个更复杂的偏移量(分钟)是我的问题。
此查询不起作用,但我如何完成它。
SELECT offset, datetime('now','+offset minutes', 'localtime') FROM database WHERE 1
如何在“+偏移分钟”之间正确放置偏移值?
'+offset'是一个包含字符的字符串+offset。
'+offset'
+offset
在 SQL 中,字符串连接是通过以下方式完成的||(数字会自动转换为字符串):
||
SELECT offset, datetime('now', '+' || offset || ' minutes', 'localtime') FROM database WHERE 1