create table test1023(id int);   --创建测试表 test1023

declare cnt int;
begin
select count(*) into cnt from test1023;
if cnt=0 then
insert into test1023 values('1');
commit;  --触发器中 需要将这句删除;
end if;
end;

 

参:http://zhidao.baidu.com/link?url=WruRf6fvsDrqjIuESnzcwi0CVDT5b3lT8s1rncvbTCdvoOiKY9CcFa1BPoJw_IEyRi4kJWfhXJ9v4XoUAi4tl4fw7_M1dsVLakV2rcQKLna

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2022-01-23
  • 2021-11-05
  • 2021-11-05
猜你喜欢
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案