2020
12-10
12-10
Mybatis中连接查询和嵌套查询实例代码
首先在mysql中确立表:#表一:地址国家表CREATETABLEaddress(aidINTAUTO_INCREMENTPRIMARYKEY,anameVARCHAR(20));INSERTINTOaddressVALUES(NULL,"魏国");INSERTINTOaddressVALUES(NULL,"蜀国");INSERTINTOaddressVALUES(NULL,"吴国");#表二:出场人物表CREATETABLEperson(pidINTAUTO_INCREMENTPRIMARYKEY,pnameVARCHAR(20),paidINT,CONSTRAINTpafkFOREIGNKEYperson(paid)REFERENCESaddress(aid)...
继续阅读 >