Oracle别名大小写-----解决方案
今天做bootstrap的treeview,要求输入节点ID id,父节点ID pid,文本 text
创新互联建站是一家专注于成都网站设计、做网站与策划设计,新兴网站建设哪家好?创新互联建站做网站,专注于网站建设10多年,网设计领域的专业建站公司;建站业务涵盖:新兴等地区。新兴做网站价格咨询:13518219792
但是执行的sql别名都是大写,所以找了下orcl的别名如何小写的问题
代码如下:
SELECT T.FUN_ID "pid",T1.FUN_ID id,T1.FUN_NM text,T1.FUN_ID, T1.FUN_CD, T1.FUN_NM FROM T_SM_FUNCTIONS T, T_SM_FUNCTIONS T1 WHERE T.FUN_ID = T1.PAR_FUN_ID AND T.FUN_ID = '5' AND T1.FUN_ID <> '5'
别名加上双引号即别名显示为小写
如果是在java中 则用转义的方式,如下
String sql = "SELECT T.FUN_ID \"pid\",T1.FUN_ID \"id\",T1.FUN_NM \"text\",T1.FUN_ID, T1.FUN_CD, T1.FUN_NM" +" FROM T_SM_FUNCTIONS T, T_SM_FUNCTIONS T1" +" WHERE T.FUN_ID = T1.PAR_FUN_ID" +" AND T.FUN_ID = '"+funid+"'" +" AND T1.FUN_ID <> '"+funid+"'"; List> list = this.queryForList(sql); return list;
文章名称:Oracle别名大小写-----解决方案
URL分享:http://pwwzsj.com/article/piccjo.html