I want to be able to search within the result-set again using a new
search term [...], but this time, it must search within the result set
of the 1st search .This might go on breaking down the result-set until
what is required is found.
It seems to me that you have not yet understood that SQL is a declarative language, not an imperative one. And yes, there are stored procedures, but these are a procedural extension to SQL and don t alter the fact that SQL is essentially declarative.
因此,在“<>......m>确定结果之前,你不再“”,而是一劳永逸地说明所有标准,最好不采用储存程序,直到你理解非程序。
举例来说,使用多个predicates的询问(关于WHERE
条款中规定的预期结果的说明)可能照此办理:
SELECT UserId FROM User
WHERE UserName LIKE cook%
AND UserAddress LIKE sesam%
AND UserCity = Hamburg ;