I'm trying to add a column to my table but I'm getting an error saying my syntax is wrong. I'm stuck, any ideas on correct syntax at line 2 on here?
String myColumnType = "DECIMAL";
st.executeUpdate("ALTER TABLE stocks.stockvalue ADD " + myColumnName + " " + myColumnType);
String updateTableSQL = ("UPDATE stocks.stockvalue SET stockvalue." + myColumnName + " = ? WHERE stockvalue.stockvalue_id = " + count);
PreparedStatement preparedStatement = conn.prepareStatement(updateTableSQL);
preparedStatement.setDouble(2, stockV);
preparedStatement.executeUpdate();
System.out.println("Done");
preparedStatement.close();
conn.close();