Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

insert statement syntax in JPQL

843830Jul 9 2007 — edited Jul 16 2008
hi
Can anyone tell me what is the syantax for insert statement in JPQL.

i tried this way,
Query query=em.createQuery("insert into Test t values(t.username= :uname)");
query.setParameter("uname",cust.getUserName());
query.executeUpdate();

it throws error as incorrect syntax near t

please help me in this
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2008
Added on Jul 9 2007
2 comments
7,534 views