标签:ems sqlserver 语句 cat ima ant img images where
五、计算字段
1、拼接字段
MySQL:使用函数concat
SqlServer:使用加号+
oracle:使用||
SELECT CONCAT(vend_name,‘(‘,vend_country,‘)‘) FROM vendors ORDER BY vend_name
使用别名AS
SELECT CONCAT(vend_name,‘(‘,vend_country,‘)‘) AS vend_title FROM vendors ORDER BY vend_name
2、算数计算:支持+、—、*、/,用()区分优先级
SELECT prod_id,quantity,item_price,
quantity*item_price AS expanded_price
FROM orderitems WHERE order_num = 20008
标签:ems sqlserver 语句 cat ima ant img images where
原文地址:http://www.cnblogs.com/bell1991/p/6958688.html