It is possible to add line numbers by using a variable, or if your MySQL/MariaDB version has the ROW_NUMBER window function. (I believe in v10.2+ for MariaDB, not sure about MySQL)
This example for those using MariaDB/MySQL. Using a variable may differ in other DBs.
SELECT * FROM air_line_info;
code sort
BR 0
CI 0
CX 0
Then by using a variable with the query:
SET @count = 0;
SELECT @count:=@count+1 AS 'line#', air_line_info.* FROM air_line_info;
Gives the output:
line# code sort
1 BR 0
2 CI 0
3 CX 0
I have a screenshot of the above example, and a fiddle using ROW_NUMBER, but I apparently do not yet have enough postings to add links.