String sqlStr="SELECT" +
" p.name," +
"h.continuous_furnace," +
"h.tray_no_start," +
"h.continuous_furnace_tray_number," +
"h.continuous_furnace_workpiece_number," +
"h.continuous_furnace_waste," +
"h.continuous_furnace_per_tray_number," +
"h.lab_test_scrap_rate," +
"h.lab_test_testing_number," +
"h.release," +
"h.straightenling_press_unqualified_number," +
"h.straightenling_press_qualified_number," +
"h.straightenling_press_scrap_rate," +
"h.total_scrap_rate," +
"h.total_sequence_number," +
"h.continuous_furnace_per_tray_number," +
"h.comment,h.block,h.releaseOfBlock,h.continuous_furnace_waste_rate,h.otherScrap" +
" FROM" +
" heat_treatment_actual_production h," +
" part_name p" +
" WHERE" +
" h.part_name_id = p.id";
Sql sql= Sqls.queryRecord(sqlStr);
List<Record> list=sql.getList(Record.class);
System.out.println(list.get(0).get("continuous_furnace").toString()+"");
问答
Record支持取出空值吗,有些列在数据库中是空的,用Record取得时候出现空指针,怎么处理
标签:
无
19 回复
下面的语句分别打印出什么:
System.out.println(list);
System.out.println(list.get(0));
System.out.println(list.get(0).get("continuous_furnace"));
@wendal 谢谢,解决了
添加回复
请先登陆