我正在编写一个java程序,它将创建一个数据库LocalStations,其中需要一个值maxStationid
int maxStationId;
我想为 maxStationId 分配表 STATION 中的单元格总数。我该怎么做?
最佳答案
你必须编写一个jdbc程序,它执行select count(*) from localstations
类型的查询,返回总计数,并将返回值分配给你的变量。
关于java - 从查询中分配值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5015853/