← Back to team overview

maria-discuss team mailing list archive

New Question: field looks weird using select *

 

Hello,

A new question has been asked in "MariaDB Documentation" by martyheitzmann:
--------------------------------
I just started using mariadb.
I created two tables so far :  the first one - no issues.
But, when I try to select * from the 2nd table, the primary key field looks incomplete: 

+--------+--------+---------------+----------------+
| teamid | league | teamname1     | teamname2      |
+--------+--------+---------------+----------------+
      |  | A      | Anaheim       | Angels  
 |ARI    | N      | Arizona       | Diamondbacks 
       | | N      | Atlanta       | Braves 
      |  | A      | Baltimore     | Orioles 
      |  | A      | Boston        | Red Sox 
    |    | A      | Chicago       | White Sox 
         | N      | Chicago       | Cubs 
...
(look past the copy/paste formatting issues please)

The teamid column is not printed out for every teamid, and based on the '|'
separator, it looks like the field has different lengths, but it's just a char(3) fixed-length.
I tried defining the field as nvarchar(3), and char(3), with the same results.
I thought it had to do with the file from which the data was imported, but it contains no
control characters. It's a ':' separated field that looks like: 
ANA:A:Anaheim:Angels  
BAL:A:Baltimore:Orioles 
BOS:A:Boston:Red Sox 
CHA:A:Chicago:White Sox 
...
file imported using : 

LOAD DATA INFILE '<file>' INTO TABLE Tteams FIELDS TERMINATED BY ':';
thoughts?

--------------------------------

To view or answer this question please visit: http://mariadb.com/kb/en/field-looks-weird-using-select/