Select a column with a keyword name

前端 未结 6 1037
感动是毒
感动是毒 2020-12-03 15:22

I have a table named \'test\'

It contains a column named \'AND\'

For that I use the following queries

insert into test values (\'a\',\'abc\')         


        
6条回答
  •  我在风中等你
    2020-12-03 16:03

    If you want to use reserved word as column, you must use backtick around the reserved word column.....

    In your case, you have to do like this:

    select `AND' from test;
    

提交回复
热议问题