Home  >  Article  >  Database  >  Oracle中使用关键字作为字段名的方法

Oracle中使用关键字作为字段名的方法

WBOY
WBOYOriginal
2016-06-07 17:07:281469browse

使用P/L SQL建表时,如果使用了关键字作为字段名,如:uid,type,date等,会提示出错无效的标识符(invalid identifier)。在一些情

使用P/L SQL建表时,如果使用了关键字作为字段名,,如:uid,type,date等,会提示出错无效的标识符(invalid  identifier)。在一些情况不得不使用关键字作为字段名时,就像一些系统升级时,从其它数据库改为Oracle时,该什么办呢。经验证, 解决办法是使用双引号“”,如“type”,同样insert等语句也是一样操作

create table Test_Tab

(

  id   number,

  “uid” number,

  ”type“ number

 

);

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn