今天开发超市管理系统的时候发现了一个问题,百度了一下这个单词ambiguous是暧昧的意思,然后百度了,网上的人说是因为数据库查询的时候的多表查询中,有列名相同导致数据库不知道是那个表的列名,无法识别所以报出这个错误

Column 'goods_type' in where clause is ambiguous

错误发生在mybatis的语句里,goods_type=?无法识别

Column 'goods_type' in where clause is ambiguous

Column 'goods_type' in where clause is ambiguous

于是我去mybatis的对应的xml文件找到语句

Column 'goods_type' in where clause is ambiguous

原来是这里忘记加g.goods_type了,导致数据库不知道是哪个表的type

相关文章:

  • 2022-12-23
  • 2021-12-07
  • 2021-11-13
  • 2022-12-23
  • 2021-05-31
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
相关资源
相似解决方案