今天写了一个长的复杂点的SQL语句,拿来分享。
sqlstr = "SELECT R.ID,R.konghao, R.type, R.zuankongx, R.zuankongy, R.bameigao,(SELECT avg(C.watergao) FROM 抽水成果表 C WHERE R.konghao = C.konghao group by C.konghao) AS watergao FROM 揭露底层厚度统计表 R WHERE R.type='" + "水文孔'";
今天写了一个长的复杂点的SQL语句,拿来分享。
sqlstr = "SELECT R.ID,R.konghao, R.type, R.zuankongx, R.zuankongy, R.bameigao,(SELECT avg(C.watergao) FROM 抽水成果表 C WHERE R.konghao = C.konghao group by C.konghao) AS watergao FROM 揭露底层厚度统计表 R WHERE R.type='" + "水文孔'";