在 sqlite3 中使用 row_number 时出现语法错误 [英] syntax error when using row_number in sqlite3
本文介绍了在 sqlite3 中使用 row_number 时出现语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过 row_number
函数基于
和我的sql如下:
select demo.*,
row_number() over (partition by id order by creator desc) as rn
from demo
但它告诉我:
("附近:语法错误:
我不知道发生了什么,我做了一些搜索,例如 如何使用SQLite 中的 ROW_NUMBER.不幸的是,我仍然无法弄清楚我犯了什么错误.任何事情都会很感激.
I dont know what happend and I do some search such as How to use ROW_NUMBER in sqlite . Unfortunately, I still cant figure out what mistake I make. Anything will be appreciate.
推荐答案
SQLite 支持 窗口函数由于 3.25 版,所以原始查询现在应该可以工作了.
SQLite supports window functions since version 3.25, so the original query should work now.
这篇关于在 sqlite3 中使用 row_number 时出现语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文