Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: query to delete last record of a table
cricketunes_at_yahoo.com wrote:
> How can i find the highest value when the available values are C1, C2,
> C3....C10?
Exactly why I said your primary key was a bad design choice.
The best solution would be to fix your primary key.
If you can't do that for some reason then:
SELECT MAX(SUBSTR(<primary_key_column>,2)) FROM <table_name>;
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Mon Apr 18 2005 - 11:54:41 CDT