JDBCTemplate简化JDBC的操作(三)需要注意的地方

一,代码

假如你现在还在为自己的技术担忧,假如你现在想提升自己的工资,假如你想在职场上获得更多的话语权,假如你想顺利的度过35岁这个魔咒,假如你想体验BAT的工作环境,那么现在请我们一起开启提升技术之旅吧,详情请点击http://106.12.206.16:8080/qingruihappy/index.html

1 List<String> cols = orgJdbcTemplate
2                     .queryForList(
3                             "SELECT COLUMN_NAME FROM information_schema.columns WHERE table_name = ?",
4                             new Object[] { "t_assets_" + productCodeLow });

二,结果

1 [{COLUMN_NAME=assets_id}, {COLUMN_NAME=PromiseBusiness}, {COLUMN_NAME=CutpaymentMethod}, {COLUMN_NAME=SettlementToBank}, {COLUMN_NAME=SettlementCycle}, {COLUMN_NAME=SMSCharge}, {COLUMN_NAME=bill99_99bill}, {COLUMN_NAME=API_Interface_imputation_99bill}, {COLUMN_NAME=TimeSummingup_99bill}, {COLUMN_NAME=Contracted_Services_Offline_99bill}, {COLUMN_NAME=POS}, {COLUMN_NAME=Contracted_Services_Offline_API}, {COLUMN_NAME=bill99_API}, {COLUMN_NAME=Contracted_Services_API_Interface_API}, {COLUMN_NAME=Message_Authorize_API}, {COLUMN_NAME=APIWithhold_API}, {COLUMN_NAME=APIBatchWithhold}, {COLUMN_NAME=PayPalType}, {COLUMN_NAME=is99bill}, {COLUMN_NAME=isAPI}, {COLUMN_NAME=WTDSChargeType_pub_sin}, {COLUMN_NAME=WTDSChargeType_pub_ban}, {COLUMN_NAME=WTDSChargeType_pri_sin}, {COLUMN_NAME=WTDSChargeType_pri_ban}, {COLUMN_NAME=OrdinaryRate_pub_sin}, {COLUMN_NAME=perMinimum_pub_sin}, {COLUMN_NAME=perMaximum_pub_sin}, {COLUMN_NAME=LowerLimitLadder_pub_sin_1}, {COLUMN_NAME=UpperLimitLadder_pub_sin_1}, {COLUMN_NAME=RatePercentage_pub_sin_1}, {COLUMN_NAME=LowerLimitLadder_pub_sin_2}, {COLUMN_NAME=UpperLimitLadder_pub_sin_2}, {COLUMN_NAME=RatePercentage_pub_sin_2}, {COLUMN_NAME=LowerLimitLadder_pub_sin_3}, {COLUMN_NAME=UpperLimitLadder_pub_sin_3}, {COLUMN_NAME=RatePercentage_pub_sin_3}, {COLUMN_NAME=LowerLimitLadder_pub_sin_4}, {COLUMN_NAME=UpperLimitLadder_pub_sin_4}, {COLUMN_NAME=RatePercentage_pub_sin_4}, {COLUMN_NAME=LowerLimitLadder_pub_sin_5}, {COLUMN_NAME=UpperLimitLadder_pub_sin_5}, {COLUMN_NAME=RatePercentage_pub_sin_5}, {COLUMN_NAME=FixedRate_pub_sin}, {COLUMN_NAME=isCashSweep_pri_sin}, {COLUMN_NAME=isCashSweep_pri_ban}, {COLUMN_NAME=isCashSweep_pub_sin}, {COLUMN_NAME=isCashSweep_pub_ban}, {COLUMN_NAME=OrdinaryRate_pub_ban}, {COLUMN_NAME=perMinimum_pub_ban}, {COLUMN_NAME=perMaximum_pub_ban}, {COLUMN_NAME=LowerLimitLadder_pub_ban_1}, {COLUMN_NAME=UpperLimitLadder_pub_ban_1}, {COLUMN_NAME=RatePercentage_pub_ban_1}, {COLUMN_NAME=LowerLimitLadder_pub_ban_2}, {COLUMN_NAME=UpperLimitLadder_pub_ban_2}, {COLUMN_NAME=RatePercentage_pub_ban_2}, {COLUMN_NAME=LowerLimitLadder_pub_ban_3}, {COLUMN_NAME=UpperLimitLadder_pub_ban_3}, {COLUMN_NAME=RatePercentage_pub_ban_3}, {COLUMN_NAME=LowerLimitLadder_pub_ban_4}, {COLUMN_NAME=UpperLimitLadder_pub_ban_4}, {COLUMN_NAME=RatePercentage_pub_ban_4}, {COLUMN_NAME=LowerLimitLadder_pub_ban_5}, {COLUMN_NAME=UpperLimitLadder_pub_ban_5}, {COLUMN_NAME=RatePercentage_pub_ban_5}, {COLUMN_NAME=FixedRate_pub_ban}, {COLUMN_NAME=OrdinaryRate_pri_sin}, {COLUMN_NAME=perMinimum_pri_sin}, {COLUMN_NAME=perMaximum_pri_sin}, {COLUMN_NAME=LowerLimitLadder_pri_sin_1}, {COLUMN_NAME=UpperLimitLadder_pri_sin_1}, {COLUMN_NAME=RatePercentage_pri_sin_1}, {COLUMN_NAME=LowerLimitLadder_pri_sin_2}, {COLUMN_NAME=UpperLimitLadder_pri_sin_2}, {COLUMN_NAME=RatePercentage_pri_sin_2}, {COLUMN_NAME=LowerLimitLadder_pri_sin_3}, {COLUMN_NAME=UpperLimitLadder_pri_sin_3}, {COLUMN_NAME=RatePercentage_pri_sin_3}, {COLUMN_NAME=LowerLimitLadder_pri_sin_4}, {COLUMN_NAME=UpperLimitLadder_pri_sin_4}, {COLUMN_NAME=RatePercentage_pri_sin_4}, {COLUMN_NAME=LowerLimitLadder_pri_sin_5}, {COLUMN_NAME=UpperLimitLadder_pri_sin_5}, {COLUMN_NAME=RatePercentage_pri_sin_5}, {COLUMN_NAME=FixedRate_pri_sin}, {COLUMN_NAME=OrdinaryRate_pri_ban}, {COLUMN_NAME=perMinimum_pri_ban}, {COLUMN_NAME=perMaximum_pri_ban}, {COLUMN_NAME=LowerLimitLadder_pri_ban_1}, {COLUMN_NAME=UpperLimitLadder_pri_ban_1}, {COLUMN_NAME=RatePercentage_pri_ban_1}, {COLUMN_NAME=LowerLimitLadder_pri_ban_2}, {COLUMN_NAME=UpperLimitLadder_pri_ban_2}, {COLUMN_NAME=RatePercentage_pri_ban_2}, {COLUMN_NAME=LowerLimitLadder_pri_ban_3}, {COLUMN_NAME=UpperLimitLadder_pri_ban_3}, {COLUMN_NAME=RatePercentage_pri_ban_3}, {COLUMN_NAME=LowerLimitLadder_pri_ban_4}, {COLUMN_NAME=UpperLimitLadder_pri_ban_4}, {COLUMN_NAME=RatePercentage_pri_ban_4}, {COLUMN_NAME=LowerLimitLadder_pri_ban_5}, {COLUMN_NAME=UpperLimitLadder_pri_ban_5}, {COLUMN_NAME=RatePercentage_pri_ban_5}, {COLUMN_NAME=FixedRate_pri_ban}, {COLUMN_NAME=ProvideReceipt}, {COLUMN_NAME=Toll_cash_sweep}, {COLUMN_NAME=Toll_POS_ter_sig}, {COLUMN_NAME=Toll_offline_contract}, {COLUMN_NAME=Toll_99bill_sig}, {COLUMN_NAME=SingleLimitForPrivate}, {COLUMN_NAME=SingleLimitForPublic}, {COLUMN_NAME=DayLimitForPrivate}, {COLUMN_NAME=DayLimitForPublic}, {COLUMN_NAME=Website}, {COLUMN_NAME=WebsiteName}, {COLUMN_NAME=DayLimitForPrivate_Risk}, {COLUMN_NAME=DayLimitForPublic_Risk}, {COLUMN_NAME=SingleLimitForPrivate_Risk}, {COLUMN_NAME=SingleLimitForPublic_Risk}, {COLUMN_NAME=isPOS}, {COLUMN_NAME=RateType_pub_sin}, {COLUMN_NAME=RateType_pri_sin}, {COLUMN_NAME=RateType_pri_ban}, {COLUMN_NAME=RateType_pub_ban}]

注意它查出来的数据就是select的后面的

COLUMN_NAME作为了一个key值,而从数据库查出来的的数据作为了value值,是一个个的map集合放到list集合中的,这是它和其它数据查的不同的地方。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值