Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Leonid Belov — — source: Informix-list mailing list archive (1991-1998)
>>
>> Serial key will be unique across the whole table regardless of what you use
>> as primary key - single column or composite key. If you want to have
>> so much rows you _cannot_ use serial column
>
>Weeeell, you can drop the system index and create a composite index with the
>serial column.
OK, it's true if you want duplicated serials. Sorry.
>
>> You cannot use insert-trigger because you need to modify same table in your
>> INSERT statement and in the trigger. It seems to me that your idea with
>> control table is only reasonable for Informix.
>
>If you use an insert trigger it gives you the NEW record BEFORE it is
>inserted. So you can lookup the next key from another table and set the key
>field BEFORE allowing the insert.
Sure, you can lookup value but cannot place this value into the newly inserted
record within trigger. If you'll try it you'll receive error -747.
As I understand, you must use extra UPDATE
- or lookup before INSERTion if you're alone
Leonid
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.