拼接字段
SELECT Concat(vend_name, ' (', vend_country, ')') FROM Vebdors ORDER BY vend_name;
SELECT Concat(RTRIM(vend_name), ' (', vend_country, ')') FROM Vebdors ORDER BY vend_name;
RTRIM 表示去掉右边所有空格;
使用别名
SELECT Concat(vend_name, ' (', vend_country, ')') AS vend_title FROM Vebdors ORDER BY vend_name;
执行算术计算
SELECT prod_id quantity * item_price AS expanded_price FROM Vebdors ORDER BY vend_name;