Transact sql user-defined rules (sql server) – Fortinet FortiDB User Manual
Page 30
FortiDB Version 3.2 Privilege Monitor User Guide
28
15-32000-81364-20081219
User-Defined Rules by RDBMS
User-Defined Rules
v_number := test;
update scott.emp set sal=8000 where empno= v_number;
end;
Transact SQL User-Defined Rules (SQL Server)
Adding a Transact SQL Rule
Example:
declare @i int, @j varchar(30)
begin
select 'great job'
set @i = 30
if @i=30
begin
set @i = @i + 1
set @j = 'equal to 30'
print ' equal to 30 '
select @j
end
if @i=31 select 'greater than 30'
while @i<35
begin
set @i=@i+1
select @i
end
Note: Oracle users must specify if they wish to use SQL or PL/SQL statements by
selecting the appropriate button prior to saving and enabling this guarded policy.