i am newbie to sql and JDBC. I am trying to write a method like this for my assignment which creates a table for the products. public List<Integer> create(List<P1> p1)
product has id, name and bunch of other attributes. I am not sure if I should declare a table called Integer in the sql file, since i don't know how to write the query for this one but I think maybe it will be like thisINSERT INTO integer (product) VALUES(:product)
? normally i would write the query for insertion like this INSERT INTO product (id, name,...etc) VALUES(?,?,?,?...etc)"
but the List<Integer>
is confusing me. Could someone please explain whats happening here and how I should implement the method?
2021年5月2日星期日
how to create table for array list of products using JDBC?
订阅:
博文评论 (Atom)
没有评论:
发表评论