I'm working on jsp code and have a problem with my db connection. I have two table in my database , ANN and SEC which SEC_ID is primary key and auto increment in SEC table and foreign key in ANN table. I want to use this query in my code
(SELECT
DATE,
MESSAGE
FROM ANN
WHERE ANN.SEC_ID = SEC.SEC_ID;)
But when I'm running my program , I've got this error:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
SELECT DATE, MESSAGE FROM ANN, SEC WHERE ANN.SEC_ID = SEC.SEC_ID;