Search code examples
mysql

Is name a reserved word in MySQL?


Can I name a column name in my mysql tables?


Solution

  • Why not just try it?

    mysql> select name from name;
    +------+
    | name |
    +------+
    |    1 |
    +------+
    

    Also you can quote any names with ``.

    mysql> select `from` from `from`;
    +------+
    | from |
    +------+
    |    1 |
    +------+