What's the syntax for Insert statement in Servlet?

I'm trying to insert record into table using servlet. Can you please show me the statement and syntax of how to use it?
[127 byte] By [wesleygcha] at [2007-11-27 8:39:48]
# 1
http://www.google.com/search?q=sql+tutorial http://www.google.com/search?q=insert+statement+syntax
sjasjaa at 2007-7-12 20:37:56 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

hi

we can insert in 2 types

1) to all column insert

insert into <tablename> values ( 1,2,3,4...n);

2) particular column insert

insert into <tablename> ( col1,col2,col3...n) values ( value1 for col1, 2 , 3...n);

ex:

PreparedStatement ps = con.prepareStatement ( "insert into billtable (grandtotal,userid,creditno)values( ?,?,? )" );

//bill table

ps.setDouble ( 1, 10.50); //replace this double value with double variable

ps.setString ( 2, "vijay");

ps.setLong ( 3, 1111111111);

ps.executeUpdate ();

ps.clearParameters ();

ps.close ();

More Details refer java with Jdbc concepts

drvijayy2k2a at 2007-7-12 20:37:56 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...