Probably Trivial: Finding Largest Primary Key used in Table

Jay Listo <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
Hi All,

This may sound trivial...but I've been trying to find out how to find 
the largest primary key that's been assigned/used within a table.

I'm new to DB development while I have done some DBA.

It would save me trouble when I want to keep control of the primary 
keys, make sure that when I insert a new record I can assign a unique 
primary key.

I would like to do this using a perl script...not as some stored 
procedure or constraint so as to keep it as DB independent (regardless 
of Sybase, MySQL, Oracle, etc) as possible.

Best Regards,
Jay
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.