there is two option:
1. Select the maximum id
Select id from inventory where id in (select max(id) from inventory )
but it takes a a lot of execute time... coz you must execute two select plan and one where
2. The limit
Select id from inventory order by id Desc limit 1this the fastest way....
0 comments:
Posting Komentar