I want to do something like this:
SELECT subscription from TENANT where tenant_id = (select GET_TENANTID(12345) as tenant_id from DUAL);
Here, GET_TENANTID
is a user-defined function. Also, tenant_id
field is a varchar2
type column.
I'm on Oracle 12c.
Your code should work, but why not just do:
select subscription
from TENANT
where tenant_id = GET_TENANTID(12345);
One assumes that the types are the same. If they are not the same, convert the number to a string.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.