Re: Script Example
Posted in 2004
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Data Types & Schema Design, Versions, Editions & End-of-Life
The manuals are online. Here are some links:
IBM Informix On Line manuals :
http://www-306.ibm.com/software/data/informix/pubs/library/
SQL Reference manual (IDS 7.x) :
http://publibfi.boulder.ibm.com/epubs/pdf/ct21nna.pdf
4gl Quick Syntax (Version 6.x but very usefull) :
http://publibfi.boulder.ibm.com/epubs/pdf/7609.pdf
Now you can read it.
>Thanks Jonathan, I do not have a manual. I'm doing this for a customer
>how is in another city. His IS people weren't mucho help that is why I
>posted the question here.
>The variable nvarchar(n) is this for strings over 255 characters? The
>way you put it it seems that varchar and nvarchar are for strings not
>over 255 characters.
>
>
I think that if you want more then 255 characters you should use a
CHAR/NCHAR or a TEXT clob.
>Also, is this syntax correct for creating an index ?
>
>Create table table1
>(col1 serial primary key not null,
> col2 ...,
> .... ...,
> );>
>
With this syntax you create a table with primary key. Informix does
implement primary key as index. However a primary key is a diferent concept.
If you want to specificaly create an index you should use CREATE INDEX
statement.
I also think that an index is automaticaly created when you create a
serial column.
>and last, is Serial a 4 byte integer.
>
>
>
Serial is like an integer column.
S'rgio
>
>
>Jonathan Leffler <jleffler@earthlink.net> wrote in message news:<BXnfc.11014$A_4.7783@newsread1.news.pas.earthlink.net>...
>
>
>>Carlos San Miguel wrote:
>>
>>
>>>Can someone post an example of a table creation with an autoinc
>>>primary key? The autoinc has to be a 4 byte integer. I know the syntax
>>>for other back-ends but not for Informix.
>>>
>>>
>>Data type SERIAL - insert zero to allocate a number (or omit the
>>column from the insert statement).
>>
>>Alternatively, in IDS 9.40, use SEQUENCES (a la DB2 and Oracle).
>>
>> Also, what the equivalent
>>
>>
>>>for the following data types? :
>>>
>>>
>>RTF(abulous)M?
>>
>>
>>
>>>Integer(4 byte)
>>>
>>>
>> INTEGER
>>
>>
>>>SmallInt(2 byte integer)
>>>
>>>
>> INTEGER
>>
>>
>>>TinyInt(1 byte Integer)
>>>
>>>
>> SMALLINT CHECK(colname BETWEEN -127 AND +127)
>> -- you choose which asymmetric value you want - +128 or -128?
>>
>>
>>>VARCHAR(cstring)
>>>
>>>
>> What's the cstring about?
>> VARCHAR(n) for 1 <= n <= 255
>>
>>
>>>NVARCHAR(text)
>>>
>>>
>> What's the text about?
>> NVARCHAR(n) for 1 <= n <= 255
>>
>>Both VARCHAR and NVARCHAR have minimum allocation options - RTFM.
>>
>>
>
>
>
sending to informix-list
Related threads
- Re: Re: Crash course for an Oracle DBA
- Re: IDS 7.30 do not start - NT
- Re: IDS 10 erratic run times
- Client SDK