Posting from the Informix-list
Posted in 1999
Topics: Platform-Specific Issues
Hello everyone. This is just a minor problem but I'm curious about a possible answer. I have a table which I drop, recreate and insert a row. I then do a select of the rowid of this row which turns out not to be 1. Is this how its supposed to work. How do I get a rowid of 1 ? I do not normally use rowids especially V6/7, but I'm working on an old system which still uses them Informix SQL 6.05 on AIX 4.1.5 Rekaish Bhardwaj Computer Answers International Limited 9 The Courtyard Warwick Road Solihull West Midlands B91 3DA United Kingdom Tel: +44 (0) 121 703 0300 Fax +44 (0) 121 703 0399 Mobile: +44 (0) 498 765424 Email: rekaishb@compans.com
Rekaish Bhardwaj wrote: > > Hello everyone. > > This is just a minor problem but I'm curious about a possible answer. > > I have a table which I drop, recreate and insert a row. > I then do a select of the rowid of this row which turns out not to be 1. > Is this how its supposed to work. > How do I get a rowid of 1 ? > I do not normally use rowids especially V6/7, > but I'm working on an old system which still uses them > > Informix SQL 6.05 on AIX 4.1.5 That is only the version of ISQL not of the engine. However, I deduce that your table is a fragmented table created with the WITH ROWID clause. For non-fragmented tables rowids are the physical location of the row in the database (or for variable length records it is at least the rows original location where a forwarding pointer is still stored). HOWEVER, for fragmented tables created WITH ROWID the rowid is like a hidden serial number colummn with an index on it into which sequential numbers are generated. This is because the fragmentation schema may cause a row to move from one fragment/dbspace to another and a forwarding pointer scheme would be to inefficient. So getting a value of one (1) for the rowind of the first row added is normal. Art S. Kagel