SELECT 语句灵活应用 字段做计算

来源:互联网 发布:mac系统游戏推荐 编辑:程序博客网 时间:2024/04/19 08:29

SELECT 语句灵活应用 做计算 

select  title_id , type , price , price- price* 0.4  from   titles

两字符型字段相加

select  au_lname + '.'+ au_fname ,city+ ','+state from   authors

字段别名  as的运用

select  title_id   as'图书代号',price as'原价',price-price*0.3 as'现价'  from  titles