Re: "double" or "DOUBLE"
Date: Sun, 23 Aug 2015 15:59:14 -0400
Message-ID: <mrd8j0$as7$1_at_dont-email.me>
On 8/23/2015 12:02 PM, Stefan Ram wrote:
> In the MySQL manual types are written in upper case:
>
> MySQL supports the SQL standard integer types INTEGER (or INT)
> The CHAR and VARCHAR types are similar
>
> . When one uses »DESCRIBE« to get a description of a table,
> MySQL write types in lower case:
>
> mysql> DESCRIBE City;
> +------------+----------+------+-----+---------+----------------+
> | Field | Type | Null | Key | Default | Extra |
> +------------+----------+------+-----+---------+----------------+
> | Id | int(11) | NO | PRI | NULL | auto_increment |
> | Name | char(35) | NO | | | |
> | Country | char(3) | NO | UNI | | |
> | District | char(20) | YES | MUL | | |
> | Population | int(11) | NO | | 0 | |
> +------------+----------+------+-----+---------+----------------+
>
> . Does this mean that the lower-case representation is more
> close to the metal of the actual implementation?
>
> When one is writing about MySQL, should one use »INT« or »int«?
>
In the manual, all caps are used to identify keywords (not just types), but the SQL keywords are case-insensitive. Note that the convention of using all caps for keywords extends into how users generally code SQL, i.e.
SELECT col1, col2
FROM mytable
ORDER BY col1;
where SELECT, FROM and ORDER BY are keywords.
It has nothing to do with it being closer or not to the metal (which should not be a consideration unless you have serious performance problems).
-- ================== Remove the "x" from my email address Jerry Stuckle jstucklex_at_attglobal.net ==================Received on Sun Aug 23 2015 - 21:59:14 CEST