Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting the last record of a table
Message
 
 
À
08/09/2003 15:50:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00827253
Message ID:
00827262
Vues:
17
>How about:
>
>
>SELECT * FROM yourtable WHERE RecNo() = RecCount()
>
>
>>Is there a way to select the last record of a table with only a select statement?

It woudldn't work if last record is deleted. Try
SELECT MAX(RECNO()) AS MaxRN FROM prod ;
	INTO ARRAY aMaxRecno
SELECT * FROM prod ;
	WHERE RECNO() = aMaxRecno[1]
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform