-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
count函数在某些情况下返回不正确 #11
Labels
Comments
Closed
terrymanu
pushed a commit
that referenced
this issue
May 4, 2018
Closed
请问怎么解决的,感谢~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考示例代码里的场景,求t_order的count总数:
使用mybatis,分成3个库,每个库里分2张表,每个表里插入2条记录,正确的count值应该是12
仅返回一个int型整数,返回的数值,仅为某条子查询的count值,没有累加,下面是输出的日志:
但是,如果改成
写成这样,即:加一个字段别名后,返回结果是正确的,会把各分库、分表子查询的count值累加返回,输出日志如下:
各位大大,有空看下,谢谢!
The text was updated successfully, but these errors were encountered: