Get all updates of Java4s
Follow Us: Email Newsletter

Spring JdbcTemplate Update() Insert Query Example

Spring » On Feb 11, 2012 { 7 Comments } By Sivateja

Spring JDBC, will see how to insert a record into database using JdbcTemplate class.  i mean using insert query in Spring JDBC using JdbcTemplate’s update() method.  Reason why i have used update() method for insert sql is update() method will returns the number of record(s) inserted.

Files Required

  • spconfig.xml

Directory Structure



1 row(s) inserted  [ Am not giving screen short, hope you will trust me ;) ]
Note:  Even delete also same….

You Might Also Like

  ♦ About Author ♦

Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.


7 Responses to “Spring JdbcTemplate Update() Insert Query Example”
  1. Nagendra says:

    ur site is excellent for developers.
    pls provide spring with hibernate,spring mvc,aop asap.
    How much time it will take to complete remaing tasks.

  2. Java4s says:



    We will post rest of spring modules as soon as possible, but we can’t specify exact time frame, hope you will understand.

    Specially AOP we are planning little big [ covering almost all consents ], be in touch with our newsletters and Facebook/twitter to get updates.

    Thank you.

  3. shyamkumar says:

    plz provide spring remaining modules(mvc,orm,AOP) and intigrations with struts,springs and hibernate .
    it is useful to us…

  4. ashok says:

    Excellent work, really helping to the programmers alot….

  5. Sumanth says:

    What can i say about this site.?? It simply wow..!!
    Great Work…!!

  6. houssam says:

    Maybe I m one year late, but this is an incredible site for learning spring in a simple way.

    thank you.

  7. chetan says:

    there is no need to create pojo class here? why?


By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2016 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.