⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 truncate_insert_ok.txt

📁 orale培训教材包括了所有的sql说明和实例
💻 TXT
字号:
----建立表
create table person (id number(10),name varchar2(20));
--------------------------------------------------

--data insert
declare
n_loop number;
s_time date;
--s_time varchar2;
e_time date;
begin
  select sysdate into s_time from dual ;
  for n_loop in 1..100000 loop
	insert into person values(n_loop,'name'||n_loop);
	commit;
  end loop;
  select sysdate into e_time from dual ;
  dbms_output.put_line(to_char((e_time),'hh:mi:ss'));
  dbms_output.put_line(to_char((s_time),'hh:mi:ss'));
end;



-------------------------------------------------
--使用delete ,commit
declare
s_time date;
--s_time varchar2;
e_time date;
v_name varchar2(13);
begin
  --select to_char(sysdate,'yyyy/mm/dd hh:mi:ss) into s_time from dual ;
  select sysdate into s_time from dual ;
  delete from person;
  commit;
  select sysdate into e_time from dual ;
  
dbms_output.put_line(to_char((e_time),'hh:mi:ss'));
dbms_output.put_line(to_char((s_time),'hh:mi:ss'));

end;

-------------------------------------------------

--truncate;
@c:\truncate


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -