1 |
/* This test illustrates the different ways it is possible to define a stored procedure */
|
2 |
|
3 |
/*Case 1. No statement terminator - also tests ignoring reserved words in comments*/
|
4 |
|
5 |
Create Procedure MyProc1
|
6 |
As
|
7 |
Declare THECOUNTRY VarChar(32);
|
8 |
Begin
|
9 |
--Begin
|
10 |
THECOUNTRY = '';
|
11 |
Update COUNTRY SET COUNTRY = 'None' Where COUNTRY = :THECOUNTRY;
|
12 |
/* End */
|
13 |
End
|
14 |
|
15 |
|
16 |
/*Case 2. ';' as statement terminator*/
|
17 |
|
18 |
Create Procedure MyProc2
|
19 |
As
|
20 |
Begin
|
21 |
Update COUNTRY SET COUNTRY = 'None' Where COUNTRY = '';
|
22 |
End;
|
23 |
|
24 |
/*Case 3. '^' as statement terminator*/
|
25 |
|
26 |
set term ^;
|
27 |
Create Procedure MyProc3
|
28 |
As
|
29 |
Begin
|
30 |
Update COUNTRY SET COUNTRY = 'None' Where COUNTRY = '';
|
31 |
End^
|
32 |
set term ;^
|
33 |
|
34 |
|
35 |
|