Results 1 to 2 of 2

Thread: how to make an insert into sql database when one field is auto-generated/auto-increm?

  1. #1

    Post how to make an insert into sql database when one field is auto-generated/auto-increm?

    Hello

    I wish to insert a row into a table, in which there is an 'id' field of type integer which is auto-generated/auto-incremented.

    Along with the id field, there are some other integer/ varchar fields that have to be inserted.

    After the insert, I also wish to obtain the ID assigned to the row that was just inserted into database.

    I read through the docs but in the relevant section it says that the format of query can differ from case-to-case in such inserts (where a field is an auto-incrementing integer).

    Hence I wish to know if and what is the standard syntax for making such an insert using Spring JDBC?

    Thanks,
    Arvind.

  2. #2
    Join Date
    Apr 2008
    Location
    Seville, Spain
    Posts
    132

    Default

    Jose Luis Martin
    Freelance Senior Consultant
    JDAL - Java Database Application Library

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •