我是直接输入的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
);
求解决 谢谢给位了
解决方案 »
- 如何合理的选择表结构?
- 使用C#语言往Oracle数据库中插入DATE型数据时总出错,求解!!
- 谁知道oracle系统自带哪些用户,例如:SYS,SCOTT等
- Oracle 查询返回DataSet 数据大量重复
- 请问给位高手——各大数据库之间的差异?
- 如何让一个job每天凌晨两点执行啊?
- 请教:入门问题:NET MANAGER配置的服务器名称问题
- Oracle 9i安装过程中当双击通用安装器时只出现通用安装器LOGO画面,然后就无反应了.
- 超级笨的问题。大家来看,估计很容易,是我对ORACLE不熟悉。100分。
- 请问为什么在SYSTEM下无法建立触发器?多谢
- 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 是不能重复的