Re: Inserting rows
Posted in 1998
Prasanna Athawale wrote: > I wanted to know how one would insert a row > in the middle of the table instead of at the end which > happens to be the default. Any ideas appreciated. What is it you want to achieve? One of the basic features of any modern RDBMS is physical and logical independence of your data, so it doesn't really matter where your row is inserted. If you need a specific order in a query, then it is your responsibility to write the ORDER BY accordingly. Or do you want to influence the ROWID that is assigned to a row? Better forget about it, the ROWID is something that is internal to the database table and should not be used for your application. Or do you want to influence the number assigned to a SERIAL field? Again, this is handled by the internal mechanisms of the database, but nobody keeps you from assigning a specific value to a SERIAL field before your insert. Of course it is then up to you to handle multiple occurences of a value. HTH, Richard -- +--------------------------+------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3413 | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | 81366 Munich, Germany | GSM : +49-172-8933578 | +--------------------------+------------------------------------------+