postgresql 中的 Rownum [英] Rownum in postgresql
本文介绍了postgresql 中的 Rownum的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么办法可以在 postgresql 中模拟 rownum 吗?
Is there any way to simulate rownum in postgresql ?
推荐答案
Postgresql > 8.4
Postgresql > 8.4
SELECT
row_number() OVER (ORDER BY col1) AS i,
e.col1,
e.col2,
...
FROM ...
这篇关于postgresql 中的 Rownum的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文