首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

oracle sql 初记

2013-02-19 
oracle sql 小记。--select * from tab1 where acldate to_date(2013-02-05,yyyy-mm-dd) and object_

oracle sql 小记。

--select * from tab1 where acldate > to_date('2013-02-05','yyyy-mm-dd') and object_id='{04564890-64C7-4703-AC23-B324CDE01B69}'--select * from tab2 where object_id ='{04564890-64C7-4703-AC23-B324CDE01B69}'去重复--select distinct owner,object_id,objecttype from downloadaccess --select count(1) from downloadaccess--select * from downloadaccessdistinct/**insert into downloadaccessdistinct(owner,objecttype,objectstore,object_id)select a.owner,a.objecttype,a.objectstore,a.object_id from (select distinct owner,objecttype,objectstore,object_id from downloadaccess) a*/create table downloadaccessDistinctTemp as (select distinct * from downloadaccess)创建零时表--create table downloadaccessDistinctTemp as (select distinct * from dmsos.downloadaccess)--select * from dmsos.downloadaccess--select count(*) from downloadaccessDistinctTemp/**insert into dmsos.downloadaccessdistinct(owner,objecttype,objectstore,object_id)select a.owner,a.objecttype,a.objectstore,a.object_id from downloadaccessDistinctTemp a**/插入数据--insert into dmsos.downloadaccess (select * from downloadaccessdistinctTemp)--delete from dmsos.downloadaccess删除数据--truncate table dmsos.downloadaccess --drop storage nowaitoracle提醒nowait时 需要注销操作session--select count(*) from dmsos.downloadaccess--select session_id from v$locked_object--select sid,serial#,username,osuser from v$session where sid = 18--alter system kill session '18,48111'

热点排行