`select distinct meuproductcategory.serial_version_u_i_d serialVersionUID,meuproductcategory.id id,meuproductcategory.id parentId,meuproductcategory.name name,meuproductcategory.level level,meuproductcategory.product_count productCount,meuproductcategory.product_unit productUnit,meuproductcategory.nav_status navStatus,meuproductcategory.show_status showStatus,meuproductcategory.sort sort,meuproductcategory.icon icon,meuproductcategory.keywords keywords,meuproductcategory.description description,meuproductcategory.serial_version_u_i_d serialVersionUID,meuproductcategory.id id,meuproductcategory.id parentId,meuproductcategory.name name,meuproductcategory.level level,meuproductcategory.product_count productCount,meuproductcategory.product_unit productUnit,meuproductcategory.nav_status navStatus,meuproductcategory.show_status showStatus,meuproductcategory.sort sort,meuproductcategory.icon icon,meuproductcategory.keywords keywords,meuproductcategory.description description from meu_product_category as meuproductcategory left join meu_product_category as meuproductcategory on meuproductcategory.id = meuproductcategory.id
Cause: java.sql.SQLSyntaxErrorException: Not unique table/alias: 'meuproductcategory'
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Not unique table/alias: 'meuproductcategory'
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:93) ~[spring-jdbc-5.2.1.RELEASE.jar:5.2.1.RELEASE]`
想要查询的是这中的是不是不行啊
select * from meu_product_category as c1 left join meu_product_category as c2 on c1.id = c2.parent_id
`select distinct meuproductcategory.serial_version_u_i_d serialVersionUID,meuproductcategory.id id,meuproductcategory.id parentId,meuproductcategory.name name,meuproductcategory.level level,meuproductcategory.product_count productCount,meuproductcategory.product_unit productUnit,meuproductcategory.nav_status navStatus,meuproductcategory.show_status showStatus,meuproductcategory.sort sort,meuproductcategory.icon icon,meuproductcategory.keywords keywords,meuproductcategory.description description,meuproductcategory.serial_version_u_i_d serialVersionUID,meuproductcategory.id id,meuproductcategory.id parentId,meuproductcategory.name name,meuproductcategory.level level,meuproductcategory.product_count productCount,meuproductcategory.product_unit productUnit,meuproductcategory.nav_status navStatus,meuproductcategory.show_status showStatus,meuproductcategory.sort sort,meuproductcategory.icon icon,meuproductcategory.keywords keywords,meuproductcategory.description description from meu_product_category as meuproductcategory left join meu_product_category as meuproductcategory on meuproductcategory.id = meuproductcategory.id
Cause: java.sql.SQLSyntaxErrorException: Not unique table/alias: 'meuproductcategory'
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Not unique table/alias: 'meuproductcategory' at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:93) ~[spring-jdbc-5.2.1.RELEASE.jar:5.2.1.RELEASE]`
想要查询的是这中的是不是不行啊
select * from meu_product_category as c1 left join meu_product_category as c2 on c1.id = c2.parent_id