When i run a select statment like
SELECT 0 AS COL FROM MYTABLE ..
Two different mysql installation returns different datatypes. One returns BIGINT second one is DECIMAL. for both cases jdbc driver is same and com.mysql.jdbc.Driver 5.1
Server Versions : 5.1.69-community (returns BIGINT) 5.6.31 (returns DECIMAL)
Is there any configuration difference? I must get BIGINT both for two installations. is it directly related with mysql version?
You can force the issue with
select CAST(0 AS UNSIGNED INTEGER) AS COL
Unsigned integers appear on the wire as BIGINTs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With