select case when t.name = 'chang' then 'hong' else t.name end from student t
then后使用了字符串‘hong’和t.name字段,这时候会报字符集不匹配。
解决方法字段加to_char,即
select case when t.name = 'chang' then 'hong' else to_char(t.name) end from student t
select case when t.name = 'chang' then 'hong' else t.name end from student t
then后使用了字符串‘hong’和t.name字段,这时候会报字符集不匹配。
解决方法字段加to_char,即
select case when t.name = 'chang' then 'hong' else to_char(t.name) end from student t