Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to set the size of string returned by PL/SQL functions?
On 05.10.2007 05:01, userjohn wrote:
> "John Heitmuller."
>> Can I change I define a size for the VarChar2 >> returned by the function?
For example if you want to pull data from the view and insert it into some table it is better to have the correct VARCHAR2 length in the view def - otherwise you always have to do CAST/SUBSTR when inserting into another table. Also, as has been pointed out by several Oracle pro's, it is generally better to make columns as wide as they need to be - but not wider. This is meta information that the DB as well as users can use (for example, if you code a client application in a language that requires preallocation of char arrays you will be thankful for the information that the field can have max. 15 chars and not 4k).
Kind regards
robert Received on Sun Oct 07 2007 - 04:57:46 CDT
![]() |
![]() |