Hey guys, so I'm trying to connect mysql to java eclipse for the first time, but I'm running into an error I can't figure out. I already have the table created in mysql and I am trying to insert a value into it. I'm getting an error for my mysql syntax, but I'm unsure of what the error is.
My top tip is, run your SQL directly against the database using whatever tool makes that easier (some form of SQL GUI).
There's no point trying to cobble together SQL inside your code without actually testing whether that SQL works.
You will make mistakes (typos at a minimum) that will be a pain to figure out if you do that.
So construct and test the SQL away from Java, and then copy/paste it into your code.
However, keep in mind that there can be differences between what can be run in an SQL client and what can be run from JDBC. I'm not sure about MySQL, but some databases/JDBC drivers don't expect the SQL statement to be ended by a semicolon, unlike an SQL client. It is possible that your current problem is the semicolon at the end of the statement.