create table tbl (a binary); select cast (a as bigint) from tbl limit 1;