自用的oracle數據庫基礎知識

oracle 的一些基礎知識

  • 向庫中插入多條數據
declare 
i number := 0;
begin
  for i in 1 .. 1000
     loop
      insert into REPORTROLE_PBS 
      values(to_char(i),'角色' || to_char(i),to_date('2017-1-7','yyyy-MM-dd'));
      end loop;
  commit;
end;
  • 經常使用的函數
to_date('date',format);//
to_char(i)   //裝換爲字符
to_number(i)//裝換爲數字
相關文章
相關標籤/搜索