Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #761
| Newsgroups | comp.lang.java.databases |
|---|---|
| Date | 2020-05-04 03:07 -0700 |
| References | <adc8d5b6-b67d-47da-836f-913f00b8a6b4@32g2000yqj.googlegroups.com> <h2u3ff$hfd$1@news.albasani.net> |
| Message-ID | <4223fa06-2da2-4303-8f62-fcd82435b6f3@googlegroups.com> (permalink) |
| Subject | Re: statement.executeUpdate(String sql) - not inserting results in correct order |
| From | aram@clir.eco |
On Tuesday, July 7, 2009 at 2:05:01 AM UTC+2, Lew wrote: > bazzer wrote: > > I am trying to insert the values of a resultset [sic] into an oracle [sic] > > database. The problem is that they seem to be inserting in random > > groups, as oppose to the way they are in the resultset [sic]. > > ... > > The data appears in the correct order in the ResultSet. But in the > > Presumably because the SQL query contains an "ORDER BY" clause, correct? > > > oracle [sic] DB, they appear in groups of timestamps. The oracle [sic] DB is > > always empty before I insert anything into it. I cannot figure out > > whey they do not insert into oracle [sic] in same order as in resultset [sic]. > > Relational tables, such as those implemented in an Oracle DB, do not have an > intrinsic order. Any logic or design that depends on a specific row order > within a table is doomed to failure. SQL engines are free to store data in > any order they choose within each table, to change that order from time to > time, and to retrieve rows in any order not necessarily matching the internal > table row order, absent an "ORDER BY" clause in the query. > > The only way to guarantee a row order from a relational table is to query that > table (or group of tables) with an "ORDER BY" clause. > > This is a fundamental truth of relational databases. > > -- > Lew Hi Lew, Do you know what the column Sys_Stats_TrbStat refers to? Looking at turbine data, and I'm curious if this corresponds to derating. Thanks!
Back to comp.lang.java.databases | Previous | Next | Find similar
Re: statement.executeUpdate(String sql) - not inserting results in correct order aram@clir.eco - 2020-05-04 03:07 -0700
csiph-web