---------------------------------------------------------------建表
----------------判断表是否存在
declare num number;
begin
    select count(1) into num from user_tables where table_name='TEST';
    if num>0 then
      execute immediate 'drop table TEST';
    end if;
end;
----------------建表
CREATE TABLE TEST(
    ValueCol numeric
);
----------------第一部分测试数据
INSERT INTO TEST VALUES(1);
INSERT INTO TEST VALUES(2);
INSERT INTO TEST VALUES(3);
INSERT INTO TEST VALUES(4);
INSERT INTO TEST VALUES(5);
INSERT INTO TEST VALUES(6);
COMMIT;
--select * from test;
---------------------------------------------------------------行的乘积
select exp(sum(ln(ValueCol))) from TEST;
--------------- 删除实体
DROP TABLE TEST;

相关文章:

  • 2022-12-23
  • 2021-11-25
  • 2021-12-24
  • 2021-04-10
  • 2022-01-08
  • 2021-04-03
  • 2021-05-17
  • 2021-08-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
相关资源
相似解决方案