11 June 2018 · dan-irving ·       Add to Favorites   Report

ERROR 2616 Numeric overflow during computation while doing count(*)


While trying to do a select count(*) from a table and I am not able to do it because of this error. I am not aware of the number of rows in the table.


When your session runs in Teradata mode the result of a COUNT is INTEGER as you already noticed (in ANSI mode it will be a DECIMAL with at least 15 digits).

The workaround is simple, cast it to a bigint:


Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too