You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select
product.brand_id,
product.lang_id,
product.product_id,
product.url_key,
product.model,
product.sku,
product.asin,
product.product_name,
product.short_name,
product.product_img,
product.status,
product.title,
product.keywords,
product.seo_desc,
product.description,
product.more_color,
product.master_color,
product.hot_flag,
product.new_flag,
product.deals_flag,
product.amz_desc,
product.amz_keywords,
product.amz_reviews,
product.amz_avg_star,
product.abtest,
product.sort,
product.old_product_id,
product.old_url_key,
categoryProduct.category_id
from catalog_product as product, catalog_category_product as categoryProduct
where product.brand_id = categoryProduct.brand_id and product.lang_id = categoryProduct.lang_id and
product.product_id = categoryProduct.product_id and product.brand_id = ? and product.lang_id = ? and
categoryProduct.category_id = ? and product.status = 1 and
product.more_color between (0 AND 1) and product.master_color = 1
order by product.sort asc
报错:
com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'duct.master_color = 1 order by prod',expect EQ, actual EQ master_color
原因:between (0 AND 1)
between 0 AND 1 不带括号查询差别很大
The text was updated successfully, but these errors were encountered:
我的Sql:
select
product.brand_id,
product.lang_id,
product.product_id,
product.url_key,
product.model,
product.sku,
product.asin,
product.product_name,
product.short_name,
product.product_img,
product.status,
product.title,
product.keywords,
product.seo_desc,
product.description,
product.more_color,
product.master_color,
product.hot_flag,
product.new_flag,
product.deals_flag,
product.amz_desc,
product.amz_keywords,
product.amz_reviews,
product.amz_avg_star,
product.abtest,
product.sort,
product.old_product_id,
product.old_url_key,
categoryProduct.category_id
from catalog_product as product, catalog_category_product as categoryProduct
where product.brand_id = categoryProduct.brand_id and product.lang_id = categoryProduct.lang_id and
product.product_id = categoryProduct.product_id and product.brand_id = ? and product.lang_id = ? and
categoryProduct.category_id = ? and product.status = 1 and
product.more_color between (0 AND 1) and product.master_color = 1
order by product.sort asc
报错:
com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'duct.master_color = 1 order by prod',expect EQ, actual EQ master_color
原因:between (0 AND 1)
between 0 AND 1 不带括号查询差别很大
The text was updated successfully, but these errors were encountered: