public String[] resolveColumns(String[] columns) throws SQLException {
		String[] cols;
		if (columns.length == 1 && columns[0].equals("*")) {
			cols = new String[fields.length];
			for (int i=0;i<fields.length;i++) {
				cols[i] = fields[i].name();
			}
		} else {
			cols = new String[columns.length];
			for (int i=0; i<columns.length;i++) {
				Field field = findField(columns[i]);
				if (field == null) throw new SQLException("Unknown field '" + columns[i] + "' in table: '" + name + "'");
				cols[i] = columns[i];
			}
		}
		return cols;
	}