Não consigo remover nada no banco. Meu código é esse:
package br.com.caelum.jdbc;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
public class TestaRemocao {
public static void main(String[] args) throws SQLException {
Connection connection = Database.getConnection();
Statement statement = connection.createStatement();
statement.execute("delete from produto id > 3");
int count = statement.getUpdateCount();
System.out.println("Foram atualizadas " + count + " linhas!");
statement.close();
connection.close();
}
}
e da esse erro aqui:
Exception in thread "main" java.sql.SQLSyntaxErrorException: unexpected token: > at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) at br.com.caelum.jdbc.TestaRemocao.main(TestaRemocao.java:13)