您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
今天做bootstrap的treeview,要求输入节点ID id,父节点ID pid,文本 text
但是执行的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;
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。