首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

帮忙看下这段SQL话语

2011-12-23 
帮忙看下这段SQL语句createtablestudent(idintnotnullIDENTITY,namevarchar2(32)notnull,passwordvarchar2

帮忙看下这段SQL语句
create   table   student(
id   int   not   null   IDENTITY,
name   varchar2(32)   not   null,
password   varchar2(32)   not   null,
primary   key(id)
);

错误信息是:
create   table   student(
                                        *
ERROR   位于第   1   行:
ORA-00922:   缺少或无效选项

[解决办法]
create table "student "(
"id " int not null IDENTITY,
"name " varchar2(32) not null,
"password " varchar2(32) not null,
primary key(id)
);
[解决办法]
oracle 没有自增字段,没有identity关键字,如果需要使用自增字段的话,可以使用序列+触发器来实现,具体使用可以上网搜一搜

热点排行