Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[JDBC] Serial data type

From: Christian Rengstl <Christian.Rengstl(at)klinik.uni-regensburg.de>
Date: Fri Nov 30 2007 - 05:52:39 EST


Hi everyone,

in my Java app at certain points INSERT queries are built dynamically, but now i am facing a problem when the target table contains a SERIAL field where NULL values are not allowed. Therefore I have two questions:

  1. How can I find out if there is a serial field in a table, as getColumnType() in ResultSetMetaData does not return a field indicating SERIAL as far as I could see?
  2. Why does it not work to issue a query like INSERT INTO x(serial_field) VALUES(NULL) as the default of the "serial_field" is nextval() anyway?

Thanks!

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings Received on Fri Nov 30 05:53:56 2007

This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:40:40 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library