×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 08 Feb 2013 15:36, James H. H. Lampert wrote:
Two things, really.
First of all, can anybody direct me to any examples or tutorials on
how to find out what a file's primary key is, via JDBC?
http://docs.oracle.com/javase/1.4.2/docs/api/java/sql/DatabaseMetaData.html
A ResultSet from the method getPrimaryKeys(String catalog, String
schema, String table) which "Retrieves a description of the given
table's primary key columns." As defined by interface DatabaseMetaData.
http://www.java2s.com/Code/Java/Database-SQL-JDBC/GetPrimaryKeyColumnFromATable.htm
"... Connection conn = ...
ResultSet rs = null;
DatabaseMetaData meta = conn.getMetaData();
// ... if you pass a table name in lowercase characters, it will
not work. ...
rs = meta.getPrimaryKeys(null, null, "survey");
..."
And second, my understanding is that the SQL spec states that if you
don't specify anything about record sequencing in an SQL SELECT,
there is no guarantee that the result set will have the records in a
predictable sequence: is that correct?
Correct. Without an ORDER BY clause the collation of rows in a set
are undefined and thus the order is unpredictable.
An attribute of the connection should be available for Sort Sequence
(SRTSEQ) so that the collation is defined as desired for when an ORDER
BY is specified.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.