代码改变世界

随笔档案-2012年3月22日

poj 2002 Squares ----二分

2012-03-22 12:33 by java环境变量, 232 阅读, 收藏,
摘要: SquaresTime Limit:3500MSMemory Limit:65536KTotal Submissions:11185Accepted:4068DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same polygon. It is not the 阅读全文

触发器-4

2012-03-22 10:22 by java环境变量, 198 阅读, 收藏,
摘要: 三、DML触发器1.控制数据安全案例01:/*限制用户只能在工作时间8:00到17:00修改表apple中的数据*/create or replace trigger tr_work_applebefore insert or update or delete on applebeginif to_char(SYSDATE, 'HH24') not between 9 and 17 thenraise_application_error(-20001,'不能在非工作时间修改该表数据');end if;end;2.实现数据审计/*审计可以用于监视非法和可疑的数据库 阅读全文

触发器-3

2012-03-22 10:21 by java环境变量, 178 阅读, 收藏,
摘要: ------------------------------------------------------第二部分:after触发器--------------------------------------------------------案例01:新建一个测试的行后触发器:行级触发器/*行级触发器即每操作一行都会触发一次触发器*/create or replace trigger tr02after update on student for each row /* each row说明是个行级别触发器*/begin dbms_output.put_line('这个是行级upd 阅读全文

触发器-2

2012-03-22 10:20 by java环境变量, 189 阅读, 收藏,
摘要: ---行触发器------------------------------------------------------第一部分:before触发器--------------------------------------------------------案例01:新建一个使用属性:new的insert触发器create or replace trigger tr01before insert on studentfor each row --必须是行级触发器begin dbms_output.put_line('这个是行前触发器!'); dbms_output.put_ 阅读全文