Get highest value of key most efficiently
| From: | Kraa de Simon | Date: | Mon, 02 Jul 2001 09:15:22 +0000 |
| Subject: | Get highest value of key most efficiently | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-55805@lists.php.net to get a copy of this message | ||
Hi,
SQL newbie...
What is the most efficient way to get the highest value of a key value using
the odbc_* functions/SQL syntax?
E.g. if I have a table with key values 1,2,3...1567 I need the higest value:
1567 so I can create a new record and assign key value 1568.
I don't want to read the whole table...
Met vriendelijke groet / With kind regards,
ICL Nederland B.V. Simon de Kraa
e-Applications / Logistic Systems Systems Architect
Het Kwadrant 1 Tel. +31 346 598865
Postbus 4000 Fax +31 346 562703
3600 KA MAARSSEN
The Netherlands mailto:Simon.de.Kraa@icl.nl
---
Microsoft Windows 2000 5.00.2195 SP 2, Progress 9.1b, Roundtable 9.1c
SCO UnixWare 7.1.1, Progress 9.1b