码迷,mamicode.com
首页 > 数据库 > 详细

postgresql 大小写,别名

时间:2017-07-13 16:09:06      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:大小写   desc   image   font   select   icon   count   class   字段名   

select ask.id "id",ask.createTime "createTime",ask.publisherID "publisherID",users.nickname "nickname",
users.icon "icon",users.gender "gender",ask.reward "reward",ask.zan "zan",ask.commentID "commentID",
ask.typee "type",ask.label "label",ask.content "content",ask.image "image",count(comment.id) "commentCount"
from ask inner join users on ask.publisherID=users.id 
left outer join comment on comment.objectID = ask.id 
group by ask.id,users.nickname,users.icon,users.gender
order by "createTime" desc
limit 10 offset 0;

postgresql默认全部小写,若要区分字段名大小写需要用引号括住

postgresql 大小写,别名

标签:大小写   desc   image   font   select   icon   count   class   字段名   

原文地址:http://www.cnblogs.com/cdyboke/p/7160192.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!