跪求 如下两种表示的区别:
第一种表示 语法错误 SyntaxError: near 'A
第二种表示能输出正确结果
第一种表示:
select Customers.Name as Customers
from Customers,(select CustomerId from Orders)A
where Customers.Id not in A;
第二种表示
select Name as Customers
from Customers
where Id not in (select CustomerId from Orders)
...全文
12132打赏收藏
SQL seclect整个用括号括起来后加一个字母
跪求 如下两种表示的区别: 第一种表示 语法错误 SyntaxError: near 'A 第二种表示能输出正确结果 第一种表示: select Customers.Name as Customers from Customers,(select CustomerId from Orders)A where Customers.Id not in A; 第二种表示 select Name as Customers from Customers where Id not in (select C
第一种
select Customers.Name as Customers
from Customers,(select CustomerId from Orders)A
where Customers.Id not in A.CustomerId ;
逻辑不正确
select Customers.Name as Customers
from Customers,(select CustomerId from Orders)A
where Customers.Id = A.CustomerId ;
这样可以,你在外面再套个子查询还可以用用