code: public List<Map<String, String>> getMetadataBySql(Sql sql) throws SQLException {
  		
  		List<Map<String, String>> table = new ArrayList<Map<String, String>>();
  
  		PreparedStatement ps = createStatment(conn, sql);
  		ResultSet rs = ps.executeQuery();
  		ResultSetMetaData rsme = rs.getMetaData();
  
  		int columnCount = rsme.getColumnCount();
  		for (int i = 1; i <= columnCount; i++) {
  			
  			Map<String, String> field = new HashMap<String, String>();
  
  			field.put("NAME", rsme.getColumnName(i)); // 字段名称
  			field.put("TYPE", rsme.getColumnTypeName(i)); //字段类型名称(例如：VACHAR2)
  			field.put("SIZE", Integer.toString(rsme.getPrecision(i))); //字段长度
  			field.put("NULLABLE", rsme.isNullable(i) == ResultSetMetaData.columnNullable ? "YES" : "NO"); //是否为空
  			field.put("REMARK", rsme.getColumnLabel(i)); //字段注释
  			
  			table.add(field);
  		}
  
  
  		return table;
  	}
docs: 通过SQL语句获取元数据信息
  
  @param sql SQL语句
  
  @return 元数据信息
  
  @throws SQLException SQL执行异常