concat用于拼接字符串,语法很简单,直接上例子
select name, concat(round(w.population*100/t1.population), '%') from world w, (select population from world where name = 'Germany') t1 where w.continent = 'Europe' 在数字后面加上%
select name, concat(round(w.population*100/t1.population), '%') from world w, (select population from world where name = 'Germany') t1 where w.continent = 'Europe'
concat中字符串用双引号在某些垃圾数据库中居然出错(“%“)!