日期:2014-05-16  浏览次数:20446 次

lcsf数据库整理sql语句

2011年7月21日? 数据库整理所用sql语句


select * from user_tab_comments?
-- 查询本用户的表,视图等

select 'select * from?? ' || table_name || ' ;????????? truncate table? ' || table_name from user_tab_comments;

select * from?? D_BANKTYPE ;???????????????? delete from?? D_BANKTYPE? a where? a.issystem = 0;
select * from?? D_BRANCH ;?????????????????? delete from?? D_BRANCH? a where? a.issystem = 0;
select * from?? D_COMPARE ;?????????
select * from?? D_DEPSTAGE ;???????????????? drop table? D_DEPSTAGE;
select * from?? D_DICCONTENT ;????????
select * from?? D_DICTYPE ;????????????????? truncate table? D_DICTYPE;
select * from?? D_DIFFICULTYLEVEL ;????????? delete from? D_DIFFICULTYLEVEL a where? a.issystem = 0;
select * from?? D_ESTIMATEITEM ;???????????? truncate table? D_ESTIMATEITEM ;
select * from?? D_EXAMDATETYPE ;???????????? truncate table? D_EXAMDATETYPE ;
select * from?? D_EXAMTYPE ;???????????????? truncate table? D_EXAMTYPE ;
select * from?? D_FRAME ;??????????????????? truncate table? D_FRAME;
select * from?? D_GRADE ;??????????????????? truncate table? D_GRADE;
select * from?? D_HONORLEVEL ;?????????????? truncate table? D_HONORLEVEL ;
select * from?? D_IMAGE ;??????????????????? truncate table? D_IMAGE ;
select * from?? D_INFORMATIONTYPE ;????????? truncate table? D_INFORMATIONTYPE;
select * from?? D_MASTERLEVEL ;????????????? delete from D_MASTERLEVEL a where? a.issystem = 0;
select * from?? D_PAPERTEMPLATE ;??????????? truncate table? D_PAPERTEMPLATE ;
select * from?? D_PAPERTYPE ;??????????????? delete from? D_PAPERTYPE a where? a.issystem = 0;
select * from?? D_PROVINCE ;???????????????? truncate table? D_PROVINCE;
select * from?? D_QUESTIONTYPE ;?????????
select * from?? D_RECORDTYPE ;?????????????? truncate table? D_RECORDTYPE;
select * from?? D_ROLE ;???????????????????? truncate table? D_ROLE;
select * from?? D_STAGE ;??????????????????? delete from? D_STAGE a where? a.issystem = 0;
select * from?? D_SUBJECT ;????????????????? delete from D_SUBJECT a where? a.issystem = 0;
select * from?? D_SYSFUNCTION ;????????????? drop table? D_SYSFUNCTION;
select * from?? D_SYSMENU ;????????????????? drop table? D_SYSMENU;
select * from?? D_SYSMODULE ;??????????????? drop table? D_SYSMODULE;
select * from?? D_VERSION ;????????????????? delete from? D_VERSION a where? a.issystem = 0;
select * from?? D_ZONECODE ;???????????????? truncate table? D_ZONECODE;
select * from?? R_ANSWER ;?????????????????? truncate table? R_ANSWER;
select * from?? R_ANSWERSET ;??????????????? truncate table? R_ANSWERSET ;
select * from?? R_ASSESS ;?????????????????? truncate table? R_ASSESS ;
select * from?? R_AXTCATALOG ;?????????????? truncate table? R_AXTCATALOG;
select * from?? R_AXTCOMMENT ;?????????????? truncate table? R_AXTCOMMENT;
select * from?? R_AXTSECTION ;?????????????? truncate table? R_AXTSECTION ;
select * from?? R_BANKCHECKSET ;???????????? truncate table? R_BANKCHECKSET ;
select * from?? R_CATALOGKPOINT ;??????????? truncate table? R_CATALOGKPOINT;
select * from?? R_CLASSWORK ;??????????????? truncate table? R_CLASSWORK ;
select * from?? R_COMMENT ;????????????????? truncate table? R_COMMENT;
select * from?? R_CONCERNSUBJECT ;?????????? truncate table? R_CONCERNSUBJECT ;
select * from?? R_CONNECT ;????????????????? truncate table? R_CONNECT;
select * from?? R_DAILYEXAMSCORE ;?????????? truncate table? R_DAILYEXAMSCORE ;
select * from?? R_DAILYFINALSCORE ;????????? truncate table? R_DAILYFINALSCORE ;
select * from?? R_DAILYSCORE ;?????????????? truncate table? R_DAILYSCORE ;
select * from?? R_DEPARTMENTINFO ;?????????? delete from?? R_DEPARTMENTINFO a where a.depid != '00000001';
select * from?? R_DEPTIMAGE ;??????????????? truncate table? R