Mysql multi-table joint query returns the content of a table. code _ MySQL
Source: Internet
Author: User
Mysql multi-table joint query returns the content of a table. bitsCN.com always reports an error when using mysql statements today. The statement is as follows:
SQL code
SELECT sapcle FROM SellEnterpriseBaseInfor sebie, SellEnterpriseBaseInforVer sebive, sellapplyperpolicangelist sapcle
WHERE 1 = 1 AND sebie. iVerID = sebive. id AND sapcle. iEnterpriseBaseInforID = sebive. id AND sapcle. iState = 1 AND sapcle. iEnterpriseID = 11027516 AND sapcle. id = 84
On the consol console, I found the SQL statement printed by hibernate. when I got the SQL statement from mysql, I always reported an error, prompting Unknown column 'sapcle' in 'Field list ', according to the sellapplyperpolicangelist sapcle defined later, it should be okay. I asked my colleagues to find that this can be written in java statements, but it should be changed when used in the mysql editor.
SQL code
SELECT sapcle. * FROM SellEnterpriseBaseInfor sebie, SellEnterpriseBaseInforVer sebive, sellapplyperpolicangelist sapcle
HERE 1 = 1 AND sebie. iVerID = sebive. id AND sapcle. iEnterpriseBaseInforID = sebive. id AND sapcle. iState = 1 AND sapcle. iEnterpriseID = 11027516 AND sapcle. id = 84
BitsCN.com
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.