易截截图软件、单文件、免安装、纯绿色、仅160KB

一个简单的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<


相关问答:

Windows 7 怎样安装Oracle - Oracle / 基础和管理

各位大哥,帮个忙。

下个Oracle for vista 版本的安装试试
10G和11G的 
http://www.oracle.com/technology/software/products/database/index.html 
------------------------------------------- ......

sql小小的疑问 - .NET技术 / C#

可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......

Oracle临时表使用问题 - Oracle / 开发

我的处理是这样的:
我有一个很大的数据集合,处于性能方面的考虑需要使用临时表过渡,并且使用分页的方式向临时表中插入数据,数据使用完毕后,删除临时表的数据。
出现的现象:当Oracle重新启动后,第一页插入的 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号