--clob转字符串:dbms_lob.substr() --锁表:select object_name,machine,s.sid,s.serial# from v$locked_object l,dba_objects o ,v$session s where l.object_id = o.object_id and l.session_id=s.sid; alter system kill session '24,111'; --查找表名 select * from User_table…
一.添加数据 /*添加数据*/insert into STU values('stu0004','赵一',18,1,"kc0004");insert into STU(STU_ID,STU_NAME,STU_AGE,STU_SET ) values('stu0013','储十一',19,1); 说明:如果不指定将数据添加到那个字段,那么此时必须列出全部数据,如果列出字段,则一一对应,必须列出约束不为空的所有字段,否则报错. 二.更新数据 /*更新数据*/update STU SET S…
oracle之sql语句优化 sql语句的优化 1.在where子句中使用 is null 或 is not null 时,oracle优化器就不能使用索引了. 2.对于有连接的列,即使最有一个是静态的值,优化器也不会使用索引 比如: select * from employss where first_name||''||last_name='Beill cliton' 要写成 :select * from employss where first_name='Beill' and last_…
查看oracle的sql语句历史记录和锁表的情况 (2012-01-04 20:59:59) 转载▼ 标签: 杂谈 分类: database 查询sql的历史记录 select * from v$sqlarea t where t.PARSING_SCHEMA_NAME in ('用户名') order by t.LAST_ACTIVE_TIME descselect * from v$sqlarea t order by t.LAST_ACTIVE_TIME desc 查看一段时间内的执行情况…