小编Amb*_*lam的帖子

比较同一列的两列

我想显示的OrderID所有订单的那个地方后放置放置所有的订单底部美元的市场.

我使用了fllowing查询

select 
    Orders.OrderID 
from 
    Orders 
where 
    Orders.OrderDate > (
        select 
            Orders.OrderDate 
        from 
            Orders 
        where 
            Orders.CustomerID = (
                select 
                    Customers.CustomerID 
                from 
                    Customers 
                where 
                    Customers.CompanyName='Bottom-Dollar Markets'
            ) 
        );
Run Code Online (Sandbox Code Playgroud)

但它给出了错误子查询回溯多个值

我正在使用northwind数据库

sql northwind

1
推荐指数
1
解决办法
3782
查看次数

标签 统计

northwind ×1

sql ×1