Reputation
481
Top tag
Next privilege 500 Rep.
Access review queues
Badges
2 7 22
Impact
~91k people reached

Jul
27
awarded  Nice Question
Feb
27
awarded  Notable Question
Jan
26
awarded  Cleanup
Jan
26
revised Why does CAST(1 AS SIGNED INTEGER) return a BIGINT on MySQL?
rolled back to a previous revision
Jan
14
awarded  Notable Question
Sep
30
awarded  Explainer
Aug
11
awarded  Popular Question
Jul
2
awarded  Curious
Jun
10
awarded  Popular Question
May
11
awarded  Notable Question
Mar
31
awarded  Yearling
Feb
26
awarded  Popular Question
Feb
6
awarded  Famous Question
Feb
1
awarded  Popular Question
Jan
23
comment Why does CAST(1 AS SIGNED INTEGER) return a BIGINT on MySQL?
@Phil - yeah I read that too, and indeed that behaves as expected i.e. doing SELECT 1+1 results in a BIGINT. But it still doesn't explain away why CAST() behaves contrary to the documentation (as I understand it) and produces a BIGINT even if asked to cast to SIGNED INTEGER or UNSIGNED INTEGER on a single scalar value.
Jan
23
comment Why does CAST(1 AS SIGNED INTEGER) return a BIGINT on MySQL?
@Phil - I did read that over and over. Why does it say SIGNED [INTEGER] in the section The type for the result can be one of the following values:. Is a SIGNED INTEGER in the context of a CAST not in fact a 32 bit integer?
Jan
23
asked Why does CAST(1 AS SIGNED INTEGER) return a BIGINT on MySQL?
Jul
26
awarded  Popular Question
Jun
28
awarded  Nice Question
Mar
21
awarded  Notable Question