v.20.5New Feature
Added Column Position to system.columns and system.parts_columns Tables
Added columnpositiontosystem.columnstable andcolumn_positiontosystem.parts_columnstable. It contains ordinal position of a column in a table starting with 1. This closes #7744. #11655 (alexey-milovidov).
Why it matters
This feature provides users with the ability to identify the exact order of columns within tables and parts, which can be useful for schema introspection, debugging, and ensuring consistent column ordering across operations.How to use it
Query thesystem.columns and system.parts_columns tables to retrieve the new position and column_position columns respectively. For example:sql<br>SELECT name, position FROM system.columns WHERE table = 'your_table_name'<br>