Re: Parentheses in the column heading

From: Luuk <luuk_at_invalid.lan>
Date: Sat, 12 Sep 2015 21:51:15 +0200
Message-ID: <55f4822c$0$23752$e4fe514c_at_news.xs4all.nl>


On 12-09-15 21:34, Stefan Ram wrote:
> mysql> SELECT ( -65 ) FROM ONE;
> +---------+
> | ( -65 ) |
> +---------+
> | -65 |
> +---------+
> 1 row in set (0.00 sec)
>
> mysql> SELECT ( 65 ) FROM ONE;
> +----+
> | 65 |
> +----+
> | 65 |
> +----+
> 1 row in set (0.00 sec)
>
> When the expression inside the parentheses contains a minus
> sign, the parentheses are shown in the column header of the
> result table. When the minus is removed, the parentheses too
> disappear from the column header.
>

When double quotest are added, the parentheses remain: mysql]> select 65 as "( 65 )";
+--------+
| ( 65 ) |
+--------+
| 65 |
+--------+
1 row in set (0.00 sec) Received on Sat Sep 12 2015 - 21:51:15 CEST

Original text of this message