我有一个MySQL查询,如下所示:
select 'abcdefghij' as stringvar
....
union select
select 'aaaaaabbbbbfffffkkkkkk' as stringvar
...
union
select 'ghghgjk' as stringvar'
....;
stringvar被截断了,我试图找出如何防止它。有没有办法在select语句中指定长度?
提前致谢!
椰油
答案 0 :(得分:0)
你可以CAST(<String> AS VARCHAR(MAX))