小编use*_*359的帖子

操作'='的排序规则(utf8_unicode_ci,COERCIBLE)和(utf8_general_ci,COERCIBLE)的非法混合

当我运行以下查询时:

CREATE ALGORITHM = UNDEFINED VIEW d_view_galerias AS (
SELECT id, titulo, 'foto' AS tipo, '' AS embed
FROM d_galeria_fotos
)
UNION (

SELECT id, titulo, 'video' AS tipo, embed
FROM d_galeria_videos
)
Run Code Online (Sandbox Code Playgroud)

我得到错误:

操作'='的排序规则(utf8_unicode_ci,COERCIBLE)和(utf8_general_ci,COERCIBLE)的非法混合

“ tipo”的格式为utf8_unicode,但其他字段的格式为utf8_general ...如何进行转换,转换?

mysql casting

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

casting ×1

mysql ×1