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
本文介绍了如何使用SQL语句进行价格计算、字符字段拼接及字段别名设置等实用技巧,通过具体示例展示了如何灵活运用SQL进行数据处理。
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

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