今天做bootstrap的treeview,要求輸入節(jié)點ID id,父節(jié)點ID pid,文本 text
創(chuàng)新互聯(lián)建站是一家專注于成都網(wǎng)站設(shè)計、做網(wǎng)站與策劃設(shè)計,新興網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)建站做網(wǎng)站,專注于網(wǎng)站建設(shè)10多年,網(wǎng)設(shè)計領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:新興等地區(qū)。新興做網(wǎng)站價格咨詢:13518219792
但是執(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;