Re: Keys larger than 2 Billion
Posted in 1996
Topics: Triggers, Constraints & Referential Integrity
Leonid Belov wrote: > > 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. > 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. Hope this helps, -- Mark. +-------------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | | |mailto:marks@west.co.za +------------------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work... force it! | |Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! | |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+------------------------------------------------+