4 ms·
The space-padding of char types also applies to zero-padding of binary types in at least some DBs, such as MS SQL Server. This can deliver counterintuitive res
by rspeele 3y ago
The space-padding of char types also applies to zero-padding of binary types in at least some DBs, such as MS SQL Server.
This can deliver counterintuitive results. Amaze your friends!
select
case when 0x1000 = 0x10 then 1 else 0 end as A,
case when 0x100 = 0x10 then 1 else 0 end as B
-----
A | B
1 | 0