How to return more than one value from a function?
Answer Posted / ravivarman_r
Public Type Income
Wages As Currency
Dividends As Currency
Other As Currency
Total As Currency
End TypeYou can now use this structure as the return
type for a function. In a real situation, the function
would look up your database tables to get the values, but
the return values would be assigned like this:
Function GetIncome() As Income
GetIncome.Wages = 950
GetIncome.Dividends = 570
GetIncome.Other = 52
GetIncome.Total = GetIncome.Wages +
GetIncome.Dividends + GetIncome.Other
End FunctionTo use the function, you could type into
the Immediate Window:
GetIncome().Wages
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Is primary key always clustered index?
What is the primary key?
Explain ddl statements in pl/sql?
What is constant in pl sql?
What is a record in pl/sql?
What is cross join example?
how many sql ddl commands are supported by 'mysql'? : Sql dba
What is an inconsistent dependency?
What is range partitioning?
What is numeric function sql?
What are system versioned tables?
Can one improve the performance of sql*loader? : aql loader
Is a foreign key always unique?
when MSQL8.0 is in market
Is nosql faster than sql?