oracle自动生成表转大小写

oracle下划线转驼峰
select substr(replace(initcap(‘a‘ || ‘t_sys_user‘), ‘_‘, ‘‘), 2) from dual;

驼峰转下划线
select regexp_replace(‘tSysUser‘, ‘([[:upper:]])(.)‘, ‘_\1\2‘) "initCustMoney",
regexp_replace(‘userId‘, ‘([[:upper:]])(.)‘, ‘_\1\2‘) "custID"
from dual;

相关推荐