Skip to content

Commit 05a6c31

Browse files
author
Paultagoras
committed
Update DatabaseMetaData.java
1 parent 3db3f92 commit 05a6c31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ public ResultSet getPrimaryKeys(String catalog, String schema, String table) thr
921921
"WHERE system.tables.primary_key <> '' " +
922922
"AND system.tables.database ILIKE '" + (schema == null ? "%" : schema) + "' " +
923923
"AND system.tables.name ILIKE '" + (table == null ? "%" : table) + "' " +
924-
"ORDER BY TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, KEY_SEQ";
924+
"ORDER BY COLUMN_NAME";
925925
log.debug("getPrimaryKeys: %s", sql);
926926
return connection.createStatement().executeQuery(sql);
927927
} catch (Exception e) {

0 commit comments

Comments
 (0)