Anda BISA menentukan jenis variabel di MySQL. Buat tabel dengan memilih variabel Anda lalu periksa jenis kolom:
set @a:="1"; -- your variable
drop temporary table if exists foo;
create temporary table foo select @a; -- dirty magic
desc foo;
+-------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| @a | longtext | YES | | NULL | |
+-------+----------+------+-----+---------+-------+