Get all updates of Java4s

Spring JdbcTemplate Update() Insert Query Example

Spring »on Feb 11, 2012 { 8 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 the Author .::

- Full Stack Java/J2EE & UI Web Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.


8 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?

  8. Jeski says:

    Hello sir, Will u please provide me jar files for jdbctemplated class related programs.
    Like above one


By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Spring-Boot-tutorials Hibernate tutorials Spring tutorials Struts tutorials Servlets tutorials Ajax tutorials Log4j tutorials jQuery tutorials Json tutorials Core Java tutorials Web Services tutorials AngularJs tutorials
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Contact | About Us | Privacy Policy | Advertise With Us

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