SQL
我认为我的加入声明是不正确的:
select distinct product.ID,
product.externalid as 'Product ID',
product.productname as 'Product Name',
StaticSpec.StaticSpecGroupName as 'Static Spec Group Name',
StaticSpec.StaticSpecName as 'Static Spec Name',
StaticSpec.StaticSpecValue as 'Static Spec Value',
company.companyname as 'Buyer Site'
from Product
join StaticSpec on Product.id = staticspec.ProductID,
join Company on company.id = product.id
where Product.active = 'Yes'
为了在查询中获取公司名称,我创建了上述内容,但我无法正确显示它,而且我的任何笔记都没有帮助。是否有任何 SQL 专家可以看出什么是不正确的?
提前非常感谢!