I am trying to create a table in sqlite3 using java and I created the following procedure. I get the following error.
Zoo.java:30: error: cannot find symbol Statement st = null; ^ symbol: class Statement location: class Zoo 1 error
//creates the table
public void creaTaulaCategories() throws SQLException {
String sql = "CREATE TABLE CATEGORIES(" +
"id INTEGER PRIMARY KEY AUTOINCREMENT," +
"nom VARCHAR(40))";
Statement st = null;
try{
st = conn.createStatement();
st.executeUpdate(sql);
}finally{
if (st != null) {
st.close();
}
}
}