Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can one create a type (domain) and see it in the OEM type dropdown lists?
On Sat, 07 May 2005 07:55:14 -0700, DA Morgan
<damorgan_at_x.washington.edu> wrote:
>Lewis C wrote:
>
>> Just for my own info, why use VARCHAR with C? I never use VARCHAR at
>> all. I haven't heard that before but I don't do much Pro*C.
>>
>> Thanks,
>>
>> Lewis
>
>Because it is a C data type.
Ah. I checked the docs:
1.6.1 What is a VARCHAR?
Here is a short description of VARCHARs: VARCHAR Description
VARCHAR2 A kind of column in the database that contains variable-length character data. This is what Oracle calls an "internal datatype", because it is a possible column type.
VARCHAR An Oracle "external datatype" (datatype code 9). You use this only if you are doing dynamic SQL Method 4, or datatype equivalencing.
VARCHAR[n] This is a Pro*C/C++ "pseudotype" that you can declare as a host variable in your Pro*C/C++ program. It is actually generated by Pro*C/C++ as a struct, with a 2-byte length element, and a [n]-byte character array.
Makes sense now.
Thanks,
Lewis
Author, ItToolBox Blog: An Expert's Guide to Oracle http://blogs.ittoolbox.com/oracle/guide/
Topic Editor, Suite101.com: Oracle Database http://www.suite101.com/welcome.cfm/oracle
Sign up for courses here:
http://www.suite101.com/suiteu/default.cfm/416752