0

I've got the following query in my Java code. But when I run it, it says a syntax error in the query.

What am I doing wrong here?

"Inset into department ( dept_name, dept_desc ) values ('" + deptName + "','" + deptDesc + "')"
marc_s
760k186 gold badges1.4k silver badges1.5k bronze badges
asked Apr 28, 2013 at 4:19

2 Answers 2

4

Its INSERT not Inset . This is a simple typo. Replace the word.

"Inset into department ( dept_name, dept_desc ) values ('" + deptName + "','" + deptDesc + "')"
 ^^^^^^
answered Apr 28, 2013 at 4:21
Sign up to request clarification or add additional context in comments.

Comments

1

For future reference, as a beginner, using an SQL formatter might help point out the error for nagging issues like these.

answered Apr 28, 2013 at 4:24

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.