String sql = "CREATE NONCLUSTERED INDEX IX_SalesPerson_SalesQuota_SalesYTD" //
+ " ON Sales.SalesPerson (SalesQuota, SalesYTD);";
SQLServerStatementParser parser = new SQLServerStatementParser(sql);
List<SQLStatement> statementList = parser.parseStatementList();
SQLCreateIndexStatement stmt = (SQLCreateIndexStatement) statementList.get(0);
Assert.assertEquals(1, statementList.size());
Assert.assertEquals("CREATE NONCLUSTERED INDEX IX_SalesPerson_SalesQuota_SalesYTD" //
+ " ON Sales.SalesPerson (SalesQuota, SalesYTD)", //
SQLUtils.toSQLString(stmt, JdbcConstants.ORACLE));
SQLServerSchemaStatVisitor visitor = new SQLServerSchemaStatVisitor();
stmt.accept(visitor);
System.out.println("Tables : " + visitor.getTables());
System.out.println("fields : " + visitor.getColumns());
System.out.println("coditions : " + visitor.getConditions());
System.out.println("orderBy : " + visitor.getOrderByColumns());