我有一个 select 语句,显然从我的数据库中提取了一些结果。一旦我得到这些结果,我想一次访问它们以获取另一个 Select 语句,这可能吗?我在用户定义的函数中这样做。
例子:
SELECT differentKindsOfBread FROM breadDrawer
WHERE differentKindsOfBread IS NOT Null
现在我想用我的结果做另一个选择,比如:
SELECT differentKindsOfBread[1] FROM differentKindsOfBread
WHERE blah = blahblah
编辑 让我们说选择了 differentKindsOfBread:
Rye
White
Wheat
half-Wheat
现在我想为每一个做选择,比如:
Select Rye (differntKindsOfBread[0]) ...
Select White (differntKindsOfBread[1]) ...
谢谢,