我是直接输入的update:
update LXWMXXB L set L.LXWMXXB_ID=201208311346401653140,L.LXDW='asdfd',L.LXFS='sdfdf'建表语句如下,是不是哪里没设置好?
-- Create table
create table LXWMXXB
(
lxwmxxb_id VARCHAR2(32) not null,
sj DATE,
lxdw VARCHAR2(50),
lxfs VARCHAR2(200)
)
tablespace ZF
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table LXWMXXB
is '联系我们信息表';
-- Add comments to the columns
comment on column LXWMXXB.lxwmxxb_id
is '联系我们信息表';
comment on column LXWMXXB.sj
is '添加时间';
comment on column LXWMXXB.lxdw
is '联系单位';
comment on column LXWMXXB.lxfs
is '联系方式';
-- Create/Recreate primary, unique and foreign key constraints
alter table LXWMXXB
add constraint PK_LXWMXXB_ID primary key (LXWMXXB_ID)
using index
tablespace ZF
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
求解决 谢谢给位了
update LXWMXXB L set L.LXWMXXB_ID=201208311346401653140,L.LXDW='asdfd',L.LXFS='sdfdf'建表语句如下,是不是哪里没设置好?
-- Create table
create table LXWMXXB
(
lxwmxxb_id VARCHAR2(32) not null,
sj DATE,
lxdw VARCHAR2(50),
lxfs VARCHAR2(200)
)
tablespace ZF
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Add comments to the table
comment on table LXWMXXB
is '联系我们信息表';
-- Add comments to the columns
comment on column LXWMXXB.lxwmxxb_id
is '联系我们信息表';
comment on column LXWMXXB.sj
is '添加时间';
comment on column LXWMXXB.lxdw
is '联系单位';
comment on column LXWMXXB.lxfs
is '联系方式';
-- Create/Recreate primary, unique and foreign key constraints
alter table LXWMXXB
add constraint PK_LXWMXXB_ID primary key (LXWMXXB_ID)
using index
tablespace ZF
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
求解决 谢谢给位了
解决方案 »
- entos下安装oracle11g成功后调sqlplus命令提示找不到:
- 数据库备份,0行的表未导出
- 求把数据由SYSTEM表空间转移到USERS表空间的方案
- 好急的错误!corruption log header!!!
- [提问]为什么无法用sys登录SQL*Plus?
- 如何让oracle多条记录的同一列的值随机组合,然后再把对应的值以及其他相同列相同值也组合显示出来
- ORA-01754: a table may contain only one column of type LONG
- 请问oracle9i的最新版本是什么啊
- oracle中的游标位置能够任意移动吗?
- 求助:SQL查询排除掉开始时间与结束时间不相邻的记录
- oracle数据多行不同列进行合并显示
- 编译release版的QMYSQL和QOCI
方法1:加个where条件,把你的此列LXWMXXB_ID值都设为唯一的,就可以了
方法2:删除这个主键 alter table LXWMXXB drop constraint PK_LXWMXXB_ID
方法3:禁用主键检查约束,但一般不这样做 alter table LXWMXXB disable constraint PK_LXWMXXB_ID update LXWMXXB L set L.LXWMXXB_ID=201208311346401653140
,L.LXDW='asdfd',L.LXFS='sdfdf'
where 你的条件
lxwmxxb_id 是主键,你这个更新语句要把所有记录的主键都更新成1个值,当然违反唯一性榆约束.你确定你想要这么更新么?
update LXWMXXB L set L.LXDW='asdfd',L.LXFS='sdfdf'
where L.LXWMXXB_ID=201208311346401653140
虽然不报错了,但是这条语句没效果,不能修改对应行。再帮我看看 谢谢了。
lxwmxxb_id啊是主键,不能相同的。
update LXWMXXB L set L.LXWMXXB_ID=201208311346401653140,L.LXDW='asdfd',L.LXFS='sdfdf'其中201208311346401653140 是不能重复的