拼接字段
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;
博客介绍了数据库操作相关内容,包括使用 RTRIM 去掉字段右边所有空格来进行拼接字段,还提及使用别名和执行算术计算,最后给出了转载来源。

被折叠的 条评论
为什么被折叠?



