您好,登錄后才能下訂單哦!
今天做bootstrap的treeview,要求輸入節(jié)點(diǎn)ID id,父節(jié)點(diǎn)ID pid,文本 text
但是執(zhí)行的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中 則用轉(zhuǎn)義的方式,如下
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;
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。