一个简单的sql语句 - Oracle / 开发
create table user_b.abcd ( a number constraint abc_pk primary key using index (create index abc_index on user_b.abcd(a) tablespace users), b number ); ------------------ SQL> @h:\code\6.sql (create index abc_index on user_b.abcd(a) tablespace users), * 第 4 行出现错误: ORA-00903: 表名无效 语句有什么问题??????
表还没有创建成功。你可以先建表,再建索引 create table user_b.abcd ( a number ); alter table TGL_user_b.abcd add constraint abc_pk primary key (a) tablespace users);引用 create table user_b.abcd ( a number constraint abc_pk primary key using index (create index abc_index on user_b.abcd(a) tablespace users), b number ); ------------------ SQL> @h:\code\6.s…… 把user_b.全部去掉 引用 引用楼主 liukai_happy 的回复: create table user_b.abcd ( a number constraint abc_pk primary key using index (create index abc_index on user_b.abcd(a) tablespace users), b number ); -------------…… 这样可以了吧? 顺便说下 主键默认就有index的 没必要新建index的引用 create table user_b.abcd ( a number constraint abc_pk primary key using index<
相关问答:
各位大哥,帮个忙。 下个Oracle for vista 版本的安装试试 10G和11G的 http://www.oracle.com/technology/software/products/database/index.html ------------------------------------------- ......
可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......
我的处理是这样的: 我有一个很大的数据集合,处于性能方面的考虑需要使用临时表过渡,并且使用分页的方式向临时表中插入数据,数据使用完毕后,删除临时表的数据。 出现的现象:当Oracle重新启动后,第一页插入的 ......