[root@kvm3 ~]# mycli -uroot -p123qwe Connecting to socket /var/lib/mysql/mysql.sock, owned by user mysql MariaDB 10.5.16 mycli 1.26.1 Home: http://mycli.net Bug tracker: https://github.com/dbcli/mycli/issues Thanks to the contributor - Roland Walker
MariaDB root@(none):(none)> use dyw; You are now connected to database "dyw" as user "root" Time: 0.002s
MariaDB root@(none):dyw> desc tbl; +-----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | <null> | auto_increment | | title | varchar(100) | NO | | <null> | | | author | varchar(40) | NO | | <null> | | | submission_date | date | YES | | <null> | | +-----------------+--------------+------+-----+---------+----------------+ 4 rows in set Time: 0.066s
MariaDB root@(none):dyw> alter table tbl add ti tinyint first; You're about to run a destructive command. Do you want to proceed? (y/n): y Your call! Query OK, 0 rows affected Time: 0.068s
MariaDB root@(none):dyw> desc tbl; +-----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+----------------+ | ti | tinyint(4) | YES | | <null> | | | id | int(11) | NO | PRI | <null> | auto_increment | | title | varchar(100) | NO | | <null> | | | author | varchar(40) | NO | | <null> | | | submission_date | date | YES | | <null> | | +-----------------+--------------+------+-----+---------+----------------+ 5 rows in set Time: 0.027s
MariaDB root@(none):dyw> alter table tbl add c char(1) after id; You're about to run a destructive command. Do you want to proceed? (y/n): y Your call! Query OK, 0 rows affected Time: 0.038s
MariaDB root@(none):dyw> desc tbl; +-----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+----------------+ | ti | tinyint(4) | YES | | <null> | | | id | int(11) | NO | PRI | <null> | auto_increment | | c | char(1) | YES | | <null> | | | title | varchar(100) | NO | | <null> | | | author | varchar(40) | NO | | <null> | | | submission_date | date | YES | | <null> | | +-----------------+--------------+------+-----+---------+----------------+ 6 rows in set Time: 0.021s