1、UNION会去掉重复的纪录,这个是怎么实现的
2、怎样查看ORACLE隔离级别,我用的PL/SQL DEVELOPER,
文档中说
Use the following methods of the oracle.jdbc.OracleConnection interface to get and set the level:•getTransactionIsolation: Gets this connection's current transaction isolation level.•setTransactionIsolation: Changes the transaction isolation level, using one of the TRANSACTION_* values.这个怎么用,要用一门语言调用这个方法么3、server process编译一条sql语句用的时间和他从磁盘调数据到data buffer cache中,那个用的时间少
2、怎样查看ORACLE隔离级别,我用的PL/SQL DEVELOPER,
文档中说
Use the following methods of the oracle.jdbc.OracleConnection interface to get and set the level:•getTransactionIsolation: Gets this connection's current transaction isolation level.•setTransactionIsolation: Changes the transaction isolation level, using one of the TRANSACTION_* values.这个怎么用,要用一门语言调用这个方法么3、server process编译一条sql语句用的时间和他从磁盘调数据到data buffer cache中,那个用的时间少
可以通过alter session set ISOLATION_LEVEL = {SERIALIZABLE | READ COMMITTED}来更改.
oracle版本是10g
开两个session,对同一个无主键表做insert,如果可以同时insert 就是read commited,否则就是SERIALIZABLE
Read-only connections are supported by the Oracle server, but not by the Oracle JDBC drivers.For transactions, the Oracle server supports only the TRANSACTION_READ_COMMITTED and TRANSACTION_SERIALIZABLE transaction isolation levels. The default is TRANSACTION_READ_COMMITTED. Use the following methods of the oracle.jdbc.OracleConnection interface to get and set the level:getTransactionIsolation: Gets this connection's current transaction isolation level.setTransactionIsolation: Changes the transaction isolation level, using one of the TRANSACTION_* values.
这个怎么用,jdbc调用么
上面写的很清楚
去掉重复的很简单 类似与distinct
如果想知道oracle内部逻辑,就不好查了 不过估计是存储过程
将查询结果做分析,
for i 1..n loop
select col into var from table where filter
if(var not in 查询结果集)
查询结果集.add(var)
处理完把结果返回,就是我们看到的distinct