Is name a reserved word in MySQL?

后端 未结 6 1525
傲寒
傲寒 2021-01-18 12:38

Can I name a column name in my mysql tables?

6条回答
  •  粉色の甜心
    2021-01-18 13:15

    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 |
    +------+
    

提交回复
热议问题