• Community
  • Questions
  • why i'm getting this error com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException?

why i'm getting this error com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException?

Exactly I've getting this error, and the error line was following as:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'employee WHERE dep_id=29' at line 1


public void deleteUser(int dep_Id)
        PreparedStatement ps=connection.prepareStatement("delete from employee where dep_id=?");
        ps.setInt(1, dep_Id);
    catch(SQLException e)


        int dep_Id=Integer.parseInt(request.getParameter("dep_Id"));


        <c:forEach items="${users}" var="user">
            <td><c:out value="${user.dep_id}"/></td>
            <td><c:out value="${user.empName}"/></td>
            <td><c:out value="${user.empAddress}"/></td>
            <td><c:out value="${user.depName}"/></td>

            <td><a href="UserController?action=edit&dep_Id=<c:out value="${user.dep_id}"/>">Update</a></td>
            <td><a href="UserController?action=delete&dep_Id=<c:out value="${user.dep_id}"/>">Delete</a></td>


2 answers

1 accepted

0 vote

Could you explain what this has to do with Atlassian products?

thanks in advance.........

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

281 views 38 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot