创建表、数据:
create table lrp_driver(oid varchar2(5),
name varchar2(20),
zhanghu varchar2(20))
insert into lrp_driver values ('00011','张三',null)
insert into lrp_driver values ('00012','李四',null)
insert into lrp_driver values ('00013','王五',null)
insert into lrp_driver values ('00014','赵六',null)
create table sys_operator
(code varchar2(20),
driver varchar2(5),
name varchar2(20))
insert into sys_operator values ('zhangsan','00011','张三')
insert into sys_operator values ('zhangsan01','00021','张三')
insert into sys_operator values ('lisi','00012','李四')
insert into sys_operator values ('wangwu','00013','王五')
insert into sys_operator values ('zhaoliu','00014','赵六')
commit
执行:
update lrp_driver a set a.zhanghu=(select min(b.code) from sys_operator b where a.name=b.name)commit
结果:
这个意思?
一、(将别的table的数据插入自己新建的table):
insert into table
select * from 别的table
二、select * from test for update
然后点击下面的小锁直接自己key数据
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)