Results 1 to 2 of 2

Thread: writing query

  1. #1
    Join Date
    Dec 2004

    writing query

    i wrote a servlet which accepts two variable num(int) and nam(string) from an html form.now i want to write that data into the postgresql data.could some body show how i could write such a code.am fairly new to servlet programming...

  2. #2
    Join Date
    Dec 2002
    Calgary, Canada
    you'd need to learn SQL for such matters,
    Here is a plain simple insert statement
    INSERT INTO table_name (ColumnName1,ColumnName2) VALUES(num,"'"+name+"'");

    Now the above statement should do what you are asking,make sure that columnName1 etc are replaced by the column names in the table.
    If you don't know any SQL then you first need to get a book or read some tutorials on line, google usualy is a life saver.


    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles