JDBC Auto-Gen Keys1

Go back to: Code Samples
//insert row
int rowcount = stmt.executeUpdate (
   "INSERT INTO LocalGeniusList (name) VALUES ('Karen')");
 
// now get the disk address - rowid -
// for the newly inserted row
ResultSet rs = stmt.executeQuery (
   "SELECT rowid FROM LocalGeniusList WHERE name = 'Karen'");




Like what you see? Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • LinkedIn
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis

Book Content Copyright © 2009 by Prentice Hall PTR. All rights reserved. | Corporate Sponsor DataDirect Technologies.