列的选择与指定
选择指定的列
定义并使用列的别名:select cust_name, cust_address as ‘地址’ from mysql_test.customers;
自定义的列别名中有空格,必须用单引号将列别名括起来
列别名不允许出现在where子句中
替换查询结果集中的数据:select cust_name
Case
When cust_sex=’M’ then’男’
Else’女’
End as 性别
From mysql_test.customers;
计算列值:select cust_name, cust_id+100 from mysql_test.customers;