发布网友 发布时间:2022-05-01 12:39
共7个回答
懂视网 时间:2022-05-01 17:00
select t1.* from t1,t2 where t1.object_id=t2.object_id; 99 rows selected. Execution Plan ---------------------------------------------------------- Plan hash value: 1506669289 -------------------------------------------------------------------------------- ------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Tim e | -------------------------------------------------------------------------------- ------- | 0 | SELECT STATEMENT | | 99 | 16929 | 201 (0)| 00: 00:03 | | 1 | NESTED LOOPS | | 99 | 16929 | 201 (0)| 00: 00:03 | | 2 | NESTED LOOPS | | 99 | 16929 | 201 (0)| 00: 00:03 | | 3 | TABLE ACCESS FULL | T2 | 99 | 1287 | 3 (0)| 00: 00:01 | |* 4 | INDEX RANGE SCAN | IDX_T1 | 1 | | 1 (0)| 00: 00:01 | | 5 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 158 | 2 (0)| 00: 00:01 | -------------------------------------------------------------------------------- ------- Predicate Information (identified by operation id): --------------------------------------------------- 4 - access("T1"."OBJECT_ID"="T2"."OBJECT_ID") Note ----- - dynamic sampling used for this statement (level=2) Statistics ---------------------------------------------------------- 8 recursive calls 0 db block gets 135 consistent gets 4 physical reads 0 redo size 6108 bytes sent via SQL*Net to client 589 bytes received via SQL*Net from client 8 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 99 rows processed
【测试】在hr用户下自行创建T1和T2表写一条SQL语句,(NL连接)
标签:
热心网友 时间:2022-05-01 14:08
数据库中两张表数据同步举例热心网友 时间:2022-05-01 15:26
用相同的语法(表名不一样),条件,热心网友 时间:2022-05-01 17:01
update语句只能修改一张表的数据,不能同时修改两张表,如果你要修改两张表,还是用2句update才能实现。热心网友 时间:2022-05-01 18:52
update T1
热心网友 时间:2022-05-01 21:00
update (追答那就不清楚了为何不写2条,然后用事务处理包含呢,写在存储过程里?
热心网友 时间:2022-05-01 23:25
update table1 set Gmoney = table2.列名 from table1 ,table2 where table1 .EMPID = table2.EMPID追问不是查找两张表相同的 而是1楼那意思 对两张表同时查询追答他肯定是web语言里面的sql语句,你写在存储过程里面,web调用存储过程就好了。