利用游標(cursor)
create or replace procedure p10
is
table_name varchar2(10);
cursor cur1 is
select table_name from user_tables;
begin
open cur1;
loop
fetch cur1 into table_name;
exit when cur1%NOTFOUND;
dbms_stats.gather_table_stats('user1',table_name);
dbms_output.put_line('susess'||table_name);
end loop;
close cur1;
end;
to52016 發表在 痞客邦 留言(0) 人氣(18)
#open database.sh
sqlplus / as sysdba <<EOF
startup
exit
to52016 發表在 痞客邦 留言(0) 人氣(28)
to52016 發表在 痞客邦 留言(0) 人氣(128)
to52016 發表在 痞客邦 留言(0) 人氣(1,804)
to52016 發表在 痞客邦 留言(0) 人氣(2,816)
to52016 發表在 痞客邦 留言(0) 人氣(166)
測試 partition table與沒有partition的table 效能的差異,由於partition table有許多類型
to52016 發表在 痞客邦 留言(0) 人氣(2,406)
create table hrttt (id number);
create table hrtt (id number);
to52016 發表在 痞客邦 留言(0) 人氣(199)
當資料表中的日期是 DATE 格式時,若要查詢 ex:SELECT * FROM TABLE WHERE "DATE"='12-2月 -15';
to52016 發表在 痞客邦 留言(0) 人氣(3,996)
to52016 發表在 痞客邦 留言(0) 人氣(11)