Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8100997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:52:38+00:00 2026-06-05T22:52:38+00:00

I found this on http://old.nabble.com/insert-statement-td21157498.html I want to do the same thing .I have

  • 0

I found this on http://old.nabble.com/insert-statement-td21157498.html
I want to do the same thing .I have two columns in my table .I am able to insert hash map values by mapping the hashmap key to the column name.Now i want put the key values pairs in the table irrespective of key name.

Pasted from the link above.

I would like to write a dynamic insert statement, but both fields and values are dynamic.

I mean

<insert id="someIDhere" parameterClass="java.util.HashMap">

    insert into table_one (

        !!! dynamic list of keys from the HashMap

    ) values (

        !!! values

    );

  </insert>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:52:40+00:00Added an answer on June 5, 2026 at 10:52 pm

    The Hashmap could be:

        HashMap<String,Integer> hm = new HashMap<String, Integer>();
        hm.put("col1", 1);
        hm.put("col2", 23);
        hm.put("col3", 34);
    

    then call the insert someIDhere with the hm as parameter.

    insert into table_one (
    
        COLUMN1, COLUMN2, COLUMN3
    
    ) values (
    
        #col1#, #col2#, #col3#
    
    );
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have done some looking and I found this: http://www.codeproject.com/Articles/14439/The-ScrollableListBox-Custom-Control-for-ASP-NET-2 but to me it
Im very new in C++ I have found this post http://msdn.microsoft.com/en-us/magazine/cc163486.aspx and trying to
I have a problem with one of my websites. http://www.weddingguest-book.com I only found this
I am learning how to draw GUI's with GDI/GDI+, i found this http://msdn.microsoft.com/en-us/library/windows/desktop/dd756596(v=vs.85).aspx#step_2__declare_that_the_application_is_dpi-aware Does
I have found this link: http://www.jfree.org/forum/viewtopic.php?f=3&t=6314 Its back in 2007 where they agree that
I'm working on a sample i found on this site: http://kevinmusselman.com/blog/2009/02/access-webcam-with-flash/ it captures the
I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still
I am trying to setup Jeash for Haxe, so I read this: http://old.haxe.org/com/libs/jeash/firststeps Now,
I am looking for direction to this old UFC effect - http://84.ufc.com/ that appears
User-agent: * Disallow: Disallow: /admin Disallow: /admin Sitemap: http://www.myadress.com/ext/sm/Sitemap_114.xml I've found this robots.txt file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.