sql - Inserting row via stored procedure (Informix) -
is possible create stored procedure inserts row table values taken procedure parameters? i'm using informix. :-(
show how creating procedure , executing.
the example give on comment question works:
[infx1210@tardis ~]$ dbaccess pavle - database selected. > create table tab1( > col1 varchar(8), > col2 integer, > col3 integer > ); table created. > create procedure sp1 (a varchar(8), b integer, c integer) > insert tab1 (col1,col2,col3) values (a,b,c); > end procedure; routine created. > execute procedure sp1 ('test sp1',1,2); routine executed. > select * tab1; col1 col2 col3 test sp1 1 2 1 row(s) retrieved. > database closed. [infx1210@tardis ~]$
on squirrel have change statement separator else temporarily.
go file menu , select new session properties, go sql tab , change statement separator \
.
connect again , try:
create procedure sp1 (a varchar(8), b integer, c integer) insert tab1 (col1,col2,col3) values (a,b,c); end procedure\
Comments
Post a Comment