code: public Set<String> getTable(String sql) {
  		Set<String> tableSet = new HashSet<String>();
  		
  		try {
  			Statement statement = parserManager.parse(new StringReader(sql));
  			
  			if (statement instanceof Select) {
  				tableSet = new SelectParser().parse((Select)statement);
  			} else if (statement instanceof Delete) {
  				tableSet = new DeleteParser().parse((Delete)statement);
  			} else if (statement instanceof Insert) {
  				tableSet = new InsertParser().parse((Insert)statement);
  			} else if (statement instanceof Update) {
  				tableSet = new UpdateParser().parse((Update)statement);
  			} else if (statement instanceof CreateTable) {
  				tableSet = new CreateTableParser().parse((CreateTable)statement);
  			} else if (statement instanceof CreateView) {
  				tableSet = new CreateViewParser().parse((CreateView)statement);
  			} else if (statement instanceof Alter) {
  				tableSet = new AlterParser().parse((Alter)statement);
  			} else if (statement instanceof Drop) {
  				tableSet = new DropParser().parse((Drop)statement);
  			}
  		} catch (Exception e) {
  			logger.debug(String.format("SQL Parse Exception: exception=%s, sql=%s", e.getMessage(), sql));
  		} catch (Error e) {
  			logger.debug(String.format("SQL Parse Exception: exception=%s, sql=%s", e.getMessage(), sql));
  		}
  		
  		Set<String> resultSet = new HashSet<String>();
  		for (String tableName : tableSet) {
  			if (StringUtils.isNotEmpty(tableName)) {
  				if (tableName.startsWith("`")) {
  					tableName = tableName.substring(1);
  				}
  				if (tableName.endsWith("`")) {
  					tableName = tableName.substring(0, tableName.length() - 1);
  				}
  				resultSet.add(tableName.toUpperCase());
  			}
  		}
  		
  		return resultSet;
  	}
docs: 获取SQL语句中所涉及的数据表
  
  @param sql SQL语句
  
  @return SQL语句中的数据表