0

Hello all :) I'm try to do something like this in Oracle 10g:

SELECT 
  CAR_ID,
  CAR_DATE,
  get_some_other_info(CAR_TYPE)
FROM CARS

Where get_some_other_info(CAR_ID) would return several columns:

| CAR_ID | CAR_DATE   | CAR_COLOR | CAR_CO2
| 001    | 01/01/2013 | BLUE      | 100
| 002    | 02/01/2013 | RED       | 120
| 003    | 03/01/2013 | BLUE      | 100

I need to use a function for implementation reasons. I feel that I could use Table functions, but I cannot wrap my head around how to use them for my case.

Best regards,

4

1 回答 1

0

您还可以使用动态 SQL 来完成此操作。将函数的结果与包含 SQL 的变量连接起来,然后立即执行。谷歌它,你会发现很多例子。

于 2013-10-23T17:04:02.273 回答