Hi, I'm also running into this issue. I can replicate it as follows:
HeidiSQL version 9.5.5453 (64 Bit) on Windows 10
Server running on the same machine is:
Sample SQL commands (attached):
DROP DATABASE IF EXISTS colswap;
CREATE DATABASE colswap;
CREATE TABLE components (Number VARCHAR(50) PRIMARY KEY, Category TINYTEXT);
INSERT INTO components(Number, Category) VALUES ('120-00001', 'Capacitor');
CREATE VIEW colview AS SELECT Number, Category FROM components;
The data looks like this:
The view has the columns swapped:
The problem goes away when I use a different version of MySQL (5.7.xx) on a Linux machine, or if I use another UI client such as SQLyog or MySQL Workbench.
So is this a bug?