51170526 commented on issue #27878:
URL:
https://github.com/apache/shardingsphere/issues/27878#issuecomment-1680069166
> > @xuschang Can you try master branch? Or add alias for COUNT(*)
> > alias can work.
> > But the SQL query "select count( * ) from table" is generated by MyBatis
queryCount.
> > just like
>
> ```
> QueryWrapper wrapper = new QueryWrapper<>();
> Integer countResult = mapper.selectCount(wrapper);
> ```
i have same question, and try alias for count
occur exception code:
conn.prepareStatement("select count(*) as total from test where
import_date='202307'");
actual sql
select count(*) as total from test_202307_00 where import_date='202307'
UNION ALL select count(*) as total from test_202307_01 where
import_date='202307' UNION ALL select count(*) as total from test_202307_02
where import_date='202307'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]