Oracle "Is true" function???
I was wondering if there is a sql function that returns TRUE or FALSE for a sub-select statement. For example...
Select * from customer where customer_id = 4 AND IsTrue(Select registered from customer where customer = 'y')
I realize that is not the best example because there are a several other ways to figure out such a query without an "IsTrue" function, but it is just an example of what type of function that I'm looking for. Thanks.
Check the docs for EXISTS...
where c1.customer_id = 4
and exists (Select 'x'
where c1.customer_id = c2.customer_id
and = ccustomer = 'y')
Seems to me that this would do the same thing:
where customer_id = 4
and ccustomer = 'y'
Click Here to Expand Forum to Full Width