- public void createIndex(String name, String column) throws SQLException {
- PreparedStatement ps = conn.prepareStatement("create index if not exists ? on ?");
- ps.setString(1, name);
- ps.setString(2, column);
+ public void createIndex(String column) throws SQLException { createIndex(column, column+"_index"); }
+ public void createIndex(String indexName, String column) throws SQLException {
+ PreparedStatement ps = conn.prepareStatement("create index if not exists "+column+" on "+name+" ("+indexName+")");