标签:rtrim( mysql row The urb 去掉 说明 sel style
mysql> SELECT Concat(vend_name,‘(‘,vend_country,‘)‘)
FROM vendors
ORDER BY vend_name;
+----------------------------------------+
| Concat(vend_name,‘(‘,vend_country,‘)‘) |
+----------------------------------------+
| ACME(USA) |
| Anvils R Us(USA) |
| Furball Inc.(USA) |
| Jet Set(England) |
| Jouets Et Ours(France) |
| LT Supplies(USA) |
+----------------------------------------+
6 rows in set (0.00 sec)
mysql> SELECT Concat(vend_name,‘(‘,vend_country,‘)‘)
FROM vendors
ORDER BY vend_name;
+----------------------------------------+
| Concat(vend_name,‘(‘,vend_country,‘)‘) |
+----------------------------------------+
| ACME(USA) |
| Anvils R Us(USA) |
| Furball Inc.(USA) |
| Jet Set(England) |
| Jouets Et Ours(France) |
| LT Supplies(USA) |
+----------------------------------------+
6 rows in set (0.00 sec)
mysql> SELECT prod_id,quantity,item_price,quantity*item_price
AS expanded_price
FROM orderitems
WHERE order_num=20005;
+---------+----------+------------+----------------+
| prod_id | quantity | item_price | expanded_price |
+---------+----------+------------+----------------+
| ANV01 | 10 | 5.99 | 59.90 |
| ANV02 | 3 | 9.99 | 29.97 |
| TNT2 | 5 | 10.00 | 50.00 |
| FB | 1 | 10.00 | 10.00 |
+---------+----------+------------+----------------+
4 rows in set (0.00 sec)
操作符 | 说明 |
---|---|
+ | 加 |
- | 减 |
* | 乘 |
/ | 除 |
标签:rtrim( mysql row The urb 去掉 说明 sel style
原文地址:https://www.cnblogs.com/chengmf/p/13144027.html