-
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.
~anthony
-
Check the docs for EXISTS...
Jeff Hunter
-
Select *
from customer.c1
where c1.customer_id = 4
and exists (Select 'x'
from customer.c2
where c1.customer_id = c2.customer_id
and = ccustomer = 'y')
Seems to me that this would do the same thing:
select *
from customer
where customer_id = 4
and ccustomer = 'y'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|