Autonum in a trigger 
Author Message
 Autonum in a trigger

I'm using the integer type to simulate an 'identity' primary key on some
tables.
I don't use identity because I heard it could generates problems if I need
to unload/reload
my table (keys get mixed sometimes).

Can I have this 'integer' key automatically incremented via a trigger?



Tue, 25 Apr 2000 03:00:00 GMT
 Autonum in a trigger

Quote:

> I'm using the integer type to simulate an 'identity' primary key on some
> tables.
> I don't use identity because I heard it could generates problems if I need
> to unload/reload my table (keys get mixed sometimes).

> Can I have this 'integer' key automatically incremented via a trigger?

        I think the best way to approach this issue is to start by
        reading this whitepaper -

        http://www.sybase.com/products/whitepapers/pkey_wpaper.html

        Its an excerpt from Peter Thawley's document. It covers in
        detail methods of generating surrogate primary keys, concurrency
        issues, etc. Also check out Jeff Lichtman's performance tips at -

        http://www.sybase.com/products/whitepapers/performance_tips.html

-am



Wed, 26 Apr 2000 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Getting the ID of an autonum field on ADDNEW

2. AUTONUM in SQL SERVER

3. Autonum

4. Does SQL Server 2K feature autonum ?

5. Help using COALESCE() to generate AutoNum

6. Autonum field is null

7. returning autonum value after insert

8. Autonum .Addnew with SQL?

9. Easiest way to reset an AutoNum to 0

10. autonum

11. create autonum field using adox

12. AutoNUM and Oracle?


 
Powered by phpBB® Forum Software