简体   繁体   中英

TDengine count() return nothing if no data

I need to use mybatis provide data which stored in TDengine time-series database. But I found the count() function will return nothing if there is no any data.

taos> select server_version();
 server_version() |
===================
 2.0.20.12        |
Query OK, 1 row(s) in set (0.000156s)

taos> select count(*) from d_entrance_data;
Query OK, 0 row(s) in set (0.000905s)

I supposed it should return 0 at least. Now I can't process it with mybatis.


       count(*)        |
========================
              0        |
Query OK, 1 row(s) in set (0.016176s)

It confuses me a lot. Any idea?

this is a known issue by design in TDengine, in TDengine 2.x version, this issue won't be fixed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM