How to properly align columns in SQLite?
With .mode tab the output is not guaranteed to be aligned because af the nature of the TAB characters. On the other hand .mode column should be working fine.

Since it looks like empty fields for NULL values are creating problems, you can change the way NULL values are displayed with .nullvalue SOMESTRING. I personally like .nullvalue [NULL].

Summing it up:

sqlite&gt; .mode column
sqlite&gt; .headers on
sqlite&gt; .nullvalue [NULL]
sqlite&gt; SELECT * FROM people;
name            surname             age         place              
--------------  ------------------  ----------  ------------------
John            Smith               34          assistant manager
Donna           Patterson           [NULL]      [NULL]


Also be sure to check the .width option to set the number of characters per column (negative values to right-align, 0 to reset) in case you need it.