[100分]面试题:通过视图(view)来更新(Update)表 老外问我的,我没答上.谁有实例代码给我看看 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 insert into ... select * from view; create view ss as select fd01 from table1;update ss set fd01=null;. [align=center]==== 思想重于技巧 ====[/align].贴子分数<20:对自已的问题不予重视。贴子大量未结:对别人的回答不予尊重。. reply via CSDN viewer 一、创建视图create or replace view test as select * from 表名二、updateupdate 表名 set 某列 =(select 某列 from view where 某列='条件') 通过视图更新表时,如果当前view关联多张表时 比如create or replace view test as select * from tab1 a, tab2 bwhere a.id = b.id要保证a.id,b.id为pk 再做update test set 列名 = XXX where 列名=XXXX 会对应更新到对应的那张表上 create or replace view tt as select t.* from test t;delete from tt where rownum<5;commit;select * from tt; 两种,一个是可更新视图。 需要有主键。还有一个是基于视图的trigger ,instead 触发器.详细可以查找一下。 insert into 要更新的表 value (select * from view); 调用 'PR_UPLOADLEARNINGLOG' 时参数个数或类型错误 求一个sql语句 分组统计中某一个字段重复的只统计一次,怎么实现 oracle数据库多表连接查询优化问题 oracle 的数据库是否只是可以建立一个 【求助】 员工转职 权限如何自动变更? 一个sqlplus调用参数和设置项的问题 利用Oracle portal实现单点登录 请问 sql语句里怎么加减秒 我需要 oracle 的电子书!!! 还是SQL(希望高手来抢分,不够可加,晚上结贴) 求一句sql文,实现类似组合函数的功能
as
select fd01 from table1;update ss set fd01=null;.
[align=center]==== 思想重于技巧 ====
[/align]
.
贴子分数<20:对自已的问题不予重视。
贴子大量未结:对别人的回答不予尊重。
.
create or replace view test as select * from 表名二、updateupdate 表名 set 某列 =(select 某列 from view where 某列='条件')
比如create or replace view test as select * from tab1 a, tab2 b
where a.id = b.id
要保证a.id,b.id为pk
会对应更新到对应的那张表上
delete from tt where rownum<5;
commit;
select * from tt;
详细可以查找一下。