如何在TDengine中对稳定查询中的记录进行排序?
我创建了一个稳定表和一些子表,然后我使用下面的 SQL 列出所有记录,但结果不是按 ts 列排序。有办法做到吗?
从稳定1中选择*
I created a stable and a few sub-tables, then I used below SQL to list all records, but the result is not ordered by ts column. any way to do it?
select * from stable1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 order by 对检索到的数据进行排序。
有关
order by
的更多信息,您可以参考搜索排序依据
You can use order by to order your retrieved data.
For more infomation about
order by
you can refer searchorder by
您可以在 TDengine 查询 SQL 语句中使用
order by
,例如以desc
结尾顺序对稳定的ts
列进行排序。You can use
order by
in a TDengine query sql statement, for example to sort a stable byts
column withdesc
ending order.