0 Replies Latest reply on Aug 11, 2012 1:38 AM by PuraVidaOTN

    How timestamp is presented to Oracle by JDBC driver?

    PuraVidaOTN
      Is SQL is the only language that the Oracle understand?

      Does JDBC driver (or DBI) eventually translate to the SQL, the kind of the SQL
      that can use under SQL Plus?

      I have SQL that has timestamp as bind variable. I used various spy tools to intercept the SQL
      that feeds the database, I got something like this:

      insert into ts values ( '2012-08-09 18:00:21.919' );

      Does this mean this the real SQL that the database sees? This is be only valid when
      nls_timestamp_format is set to 'yyyy-mm-dd hh24:mi:ss.FF'. If this is the case, then
      who sets the parameter, and how do I see it?

      Does JDBC ever translate SQL like the following?

      insert into ts values ( timestamp '2012-08-09 18:00:21.919' );
      insert into ts values ( to_timestamp( '2012-08-09 18:00:21.919', 'yyyy-mm-dd hh24:mi:ss.FF') );

      When using 10046, the TIMESTAMP bind variable is represent by a memory dump, why doesn't
      use timestamp '...' or to_timestamp(...)? What it Oracle server really see?