将A表中与B表相同的字段数据插入到B表中,A表中有个字段为varchar(255)类型,而B表中对应字段类型为json类型,
使用 insert into B (column_b1,column_b2,column_b3)
select column_a1,column_a2,column_a3 from A
语句插入失败,
请问用cast('[]' as json)语句的话,该如何处理类型不同的字段
A表中中该字段数据:
name
Zhangsan
Lisi
Wangwu
B表中中该字段数据:
name
{"en": "Zhangsan", "zh": "Zhangsan"}
{"en": "Lisi", "zh": "Lisi"}
{"en": "Wangwu", "zh": "Wangwu"