Query error with ambiguous column name in SQL

前端 未结 8 786
被撕碎了的回忆
被撕碎了的回忆 2020-11-27 06:54

I get an Ambiguous column name error with this query (InvoiceID). I can\'t figure out why. They all seem to be joined correctly so why doesn\'t the management studio know to

8条回答
  •  迷失自我
    2020-11-27 07:53

    Because you are joining two tables Invoices and InvoiceLineItems that both contain InvoiceID. change to Invoices.InvoiceID to make it correct.

提交回复
热议问题