enter image description here I want to add the full_name row to the existing database, in the place of COLUMN highlights the "unrecognized statement", what could be the problem, tell me?

public static void addColumn() { try { st = conn.createStatement(); String sql = "ALTER TABLE applicants ADD COLUMN full_name TEXT"; st.executeUpdate(sql); st.close(); conn.close(); } catch (SQLException e) { e.printStackTrace(); 
  • Highlights where? In the development environment? Or throws an execution when executed? - Roman Danilov
  • @ RomanDanilov in the development environment, in InteliJ, when executing the SQL error or missing database (duplicate column name: full_name) - Valek Potapov
  • Duplicate column full_name he tells you. So the column already exists. - Roman Danilov
  • The fact of the matter is that does not exist .. - Valek Potapov
  • What DBMS? Try without the word COLUMN. - Sergey Moiseenko

0