sql语句中as的意思是什么

来源:互联网 发布:华新数控螺紋编程 编辑:程序博客网 时间:2024/06/08 04:57
别名,或者说给显示的结果改名。比如,select name as 姓名 from student.

意思是查询student表中的name字段,但是在显示的时候显示姓名(而不是表中的name)


还比如下面:concat(path,',',id)函数用","把前后字段【path和id】连接起来形成一个新字段   改名为fullpath

 select id,catename,path,concat(path,',',id) as fullpath from likecate where 1 order by fullpath asc;


0 0
原创粉丝点击