Álvaro G. Vicario wrote:
> El 26/04/2012 3:37, Thomas 'PointedEars' Lahn escribió/wrote:
>>>> Why is the text column right aligned, if i do this:
>>>>
>>>> ~> mysql test -Ne "select * from test1 limit 2"
>>>> +---+---+------------------------------------------+
>>>> | 1 | 1 | YY |
>>>> | 2 | 2 | YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY |
>>>> +---+---+------------------------------------------+
>>>>
>>>> If i leave out the '-N' the result is aligned OK:
>>>>
>>>> ~> mysql test -e "select * from test1 limit 2"
>>>> +----+---------+------------------------------------------+
>>>> | id | USER_ID | TEXT |
>>>> +----+---------+------------------------------------------+
>>>> | 1 | 1 | YY |
>>>> | 2 | 2 | YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY |
>>>> +----+---------+------------------------------------------+
>
>> The column in the *output* is only that wide, and the number is aligned
>> right, because of the column name and the numeric field type. Where
>> there
>> is no column name to put out, there is no need to literally waste space,
>> and all the numbers here are only one digit wide. So the column
>> output is
>> (without padding and border) only one character wide.
>
> I suspect the OP is actually worried about the right aligned "YY" string.
>
>
well perhaps when you skip column names it assumes numeric results.
>
--
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.