js处理数据库字段重命名(去下划线替换为驼峰规则)

SELECT 
  column_name AS '列名', data_type AS '数据类型', character_maximum_length AS '字符长度', numeric_precision AS '数字长度', numeric_scale AS '小数位数', is_nullable AS '是否允许非空', 
  CASE
    WHEN extra = 'auto_increment' 
    THEN 1 
    ELSE 0 
  END AS '是否自增', column_default AS '默认值', column_comment AS '备注' 
FROM
  Information_schema.columns 
WHERE table_Name = 'test_table' ;

 

var  v=["OPERATING_INCOME",
"OPERATING_COST",
"BUSINESS_TAXADD",
"COST_SALES",
"MANAGEMENT_FEES",
"DEV_COST",
"FINANCE_CHARGES",
"INTEREST_PAYMENTS",
"NETEXCHANGE_LOSS",
"IMPAIRMENT_ASSETS",
"OTHER_INCOMES",
"BENEFAIR_VALCHA",
"DISPOSED_ASSETS",
"RETURN_INVESTMENT",
"INVEST_INCOME",
"OPERATING_PROFIT",
"NETRATING_INCOME",
"GOVERNMENT_SUBS",
"PROFIT_TOTAL",
"NET_PROFIT",
"NET_PROFITAT",
"TOTAL_ASSETS",
"CURRENT_ASSETS",
"MONETARY_FUND",
"NOTES_ACCOUNTS_RECEIV",
"ACCOUNTS_RECEIV",
"INVENTORY",
"RAW_MATERIAL",
"INVENTORY_GODWDB",
"TOTAL_AMOUNLI",
"CURRENT_LIABIL",
"NOTES_ACCOUNTS_PAYABLE",
"BANK_LOAN",
"BONDS_PAYABLE",
"TOTAL_EQUITY",
"ERSHIP_OWN",
"NETCASH_FLOWACT",
"TOTINTEREST_LIA",
"CAPINTEREST_EXP",
"TOTTAXES_PAYABLE",
"TOTTAXESFEES_PAID",
"EMPLOYEE_COMPENSN",
"GROSS_WAGES",
"TOTSALARY_STAFF",
"WORKER_NUMBER",
"NUM_EMPLOYEPOST",
"INVESTM_FIXEDAS",
"DEPRECIAT_AMOUNT",
"GROSS_LABDUCT",
"GROSSIL_OUTVALUE",
"ILSALES_VALUE",
"EXPORT_SALEREVE",
"NEWPRODUC_VALUE"];

for(var i=0;i

 

你可能感兴趣的:(前端,数据库)