Alle 08:54, luned́ 29 marzo 2004, Ali Sadik Kumlali ha scritto: > I wonder if I could use max(rowid) safely instead of count(*). Does > rowid increments by 1 for each new row?
As previously stated, it's not safe. A workaround could be to create an additional table with one field and one row, in which you put the number of rows of the other table. At every insert or delete on the big table, you should update the value of this counter (the best way I can think of is using a trigger, with a single atomic update: UPDATE table_counter SET counter = counter + 1). Ciao ce -- Cesare D'Amico - boss (@t) cesaredamico (dot) com http://www.cesaredamico.com ~ http://www.phpday.it There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. -- The Zen of Python, by Tim Peters --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]