Let’s consider the following example
CREATE TABLE X_TEST (
A INT,
B INT,
C TEXT,
PRIMARY KEY (A,B),
SHARD KEY (A) USING CLUSTERED COLUMNSTORE);
I check the metadata for columns in the columns table
SELECT COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE, COLUMN_KEY
FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ‘X_TEST’;
and see that the second column is not marked as part of primary key
COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE, COLUMN_KEY
A 1 INT PRI
B 2 INT
C 3 TEXT
select @@memsql_version
7.5.11
Why the second column is not marked as PRI in the data dictionary table?