Nesting SQL ??? (1 Viewer)

RossG

Registered User.
Local time
Today, 19:07
Joined
Apr 18, 2001
Messages
21
Is it possible to 'nest' pieces of SQL code ?

For example if I need a query such as:

" where (A = 1 AND B = 2) OR (A = 1 AND C = 2) "


can this be nested into something like:

" where (A = 1 AND (B OR C = 2)) "

Sorry if it sounds like a dumb question but I'm struggling with this SQL mumbo-jumbo!




[This message has been edited by RossG (edited 02-03-2002).]
 

Alexandre

Registered User.
Local time
Tomorrow, 01:07
Joined
Feb 22, 2001
Messages
794
Perfectly possible. Correct syntax would be
WHERE (A=1 AND (B=2 or C=2)).

Alexandre
 

Users who are viewing this thread

Top Bottom