The Informix DEFINE statement allows declaring a list of variables with one data type, which is specified at the end
of the variable list. In Oracle you can declare only one variable with the appropriate datatype.
SQLWays converts the Informix DEFINE statement with a list of variables to a standalone declaration statement for
each variable in Oracle.
SQLWays converts Informix LIKE to the Oracle %TYPE attribute.
TABLE 21. Example of variable declaration conversion
Informix | Oracle |
create procedure with_multidef_stmt (var1 int)
define a, b, c int;
define d, e, f char(20);
let a = 10;
end procedure; | create or replace procedure with_multidef_stmt (var1 int)
as
a int;
b int;
c int;
d char(20);
e char(20);
f char(20);
begin
set a := 10;
end; |
create procedure with_LIKE (var1 int)
define i LIKE tab.c1;
define j,k LIKE tab.c2;
let i = 20;
end procedure; | CREATE OR REPLACE PROCEDURE with_LIKE(var1
NUMBER)
AS
i tab.c1 %TYPE;
j tab.c2 %TYPE;
k tab.c2 %TYPE;
BEGIN
i := 20;
end; |
create procedure with_LIKE1 (var1 LIKE tab.c1)
define i LIKE tab.c1;
define j,k LIKE tab.c2;
let i = 20;
end procedure; | CREATE OR REPLACE PROCEDURE with_LIKE(var1 tab.c1
%TYPE)
AS
i tab.c1 %TYPE;
j tab.c2 %TYPE;
k tab.c2 %TYPE;
BEGIN
i := 20;
end; |