Home > Database > Mysql Tutorial > mysql-怎么查询主表的外键值、mybatis代码怎么写

mysql-怎么查询主表的外键值、mybatis代码怎么写

WBOY
Release: 2016-06-06 09:38:22
Original
1613 people have browsed it

mybatismysqlsql

tproductdetail表:ID、PRDTID(外键)、SPEC1ID(外键)、SPEC2ID(外键)、DCODE、QUANTITY。
tproduct 表:ID、CID、BID、SID、UID、CODE
tspc 表:ID、NAME、DISNUM、SEQ、SYSDATE、ISACTIVES、CID。
tproductdetail表中的PRDTID(外键)值对应的是tproduct的主键ID值;tproductdetail中的SPEC1ID(外键)值对应的是tspc的主键ID值,tproductdetail中的SPEC2ID(外键)值对应的是tspc的主键ID值,现在我想在jsp页面中的下拉框中查出tproductdetail的外键值,mybatis查询代码怎么写?具体怎么实现?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template