Oracle alias case-solution
To do the treeview of bootstrap today, you are required to input node ID id, parent node ID pid, and text text
But the sql aliases executed are all uppercase, so I looked for the problem of how to lowercase orcl aliases.
The code is as follows:
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'
The alias is displayed in lowercase with double quotation marks
If it is in java, escape is used, as follows
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