
mysql起别名的关键字只有as?as只能用在字段名和查询寻结果?
2个回答
展开全部
表名也可以用别名啊,但是as一般都省略的
select
a.name
as
姓名,a.mobile
as
手机号码
from
table1
as
a
left
join
table2
as
b
on
a.mobile=b.mobile
写成
select
name
姓名,mobile
手机号码
from
table1
a
left
join
table2
b
on
a.mobile=b.mobile
select
a.name
as
姓名,a.mobile
as
手机号码
from
table1
as
a
left
join
table2
as
b
on
a.mobile=b.mobile
写成
select
name
姓名,mobile
手机号码
from
table1
a
left
join
table2
b
on
a.mobile=b.mobile
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询