How To Handle Table Column Named With Reserved Sql Keyword?

前端 未结 3 716
花落未央
花落未央 2020-12-06 16:35

I have an old table that has a column named \"RANK\" and this name is a keyword in Oracle, I don\'t know how this table created and I can\'t rename this column because it is

3条回答
  •  误落风尘
    2020-12-06 17:06

    Oracle uses double quotes " to escape reserved words.

    insert into mytbl ("RANK")
    select "RANK" 
    from other_table
    

    One other note, Oracle requires correct case as well.

提交回复
热议问题