Hi Gonzalo

>> "Do not" is stronger than "don't"
>> - actually very close to "you must not".

> Yep, I know... that's the reason of my doubt.. why must i avoid specifying
> values on a DEFAULT SERIAL? what's the disadvantage? or what problems could
> it cause to do so...? am i breaking the number generator in any way?
> For example, if a have the following:
> Table: TABLE1
> Columns:
>     ID INTEGER DEFAULT SERIAL 1,
>     VAL VARCHAR(10)

> I insert 3 values ('a', 'b', 'c') and the number generator assigns the ID 1,
> 2 and 3 to them. Later, i insert a new value 'd' but i specify ID = 4. The
> next time i insert a value without specifying the ID, which number will it
> get? 5? or ill get a Duplicated primary key when it tries to assign 4?

Well ... just don't specify that ID.

I don't know if SAP DB chokes if you do - why not make a quick test?

/gustav

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to