自用的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)//装换为数字
相关文章
相关标签/搜索