Arithmetic overflow error converting expression to data type int.
The Explanation: The upper bounds of an int is a little over two billion: 2,147,483,647. The count() function always returns an int.
The Solution: Use count_big() instead, as it always
returns a bigint data type, which has an upper bound of
9,223,372,036,854,775,807. “select count_big(1) from MY_HUGE_TBL”
Không có nhận xét nào:
Đăng nhận xét