我知道如何使用联接可以创建重复的值。因此,我们需要在join语句中使用DISTINCT关键字。但是为什么使用子查询也不提供重复的值呢?考虑产生相同结果的result语句如下 select ID, Name, Description where ID IN on tblProducts.Id= tblProductSales
CREATE OR REPLACE FUNCTION f() RETURNS table(a int)$$$$;select * from b where b in f();select * from b where b in (select * fromf());
有没有办法实现第一种类型的查询,因为第二种查询更冗长?