うんちくメモ

ただのメモです。内容は妄想の可能性があります

テスト用データ作成メモ

・私のようにオツムが弱いためいつまでたっても覚えない人用の何かしらテストしたい時のやっつけユーザ、テーブル、データ作成テンプレのメモ

sqlplus / as sysdba
--テストユーザ作成
create user test identified by test default tablespace users;
grant dba to test; 
disconn;

--TESTユーザでログイン
conn test/test

--テーブル作成
create table testtb (item number) tablespace users;

--データ作成
begin
  for i in 1..1000 loop
    insert into testtb values(i);
  end loop;
  commit;
end;
/

--データ確認
select * from testtb;