Patrice OLIVER wrote:

Hello,

In this example, I use 2 tables :
create table types (
typnum integer primary key,
catcode varchar(2),
typlib varchar(35));

create table uv (
uvnum varchar(5) primary key,
typnum integer,
uvlib varchar(50));

alter table uv
  add constraint fk_uv_type foreign key (typnum)
     references types (typnum)
     on delete restrict on update restrict;

I also use stored procedures :

create function numtype(varchar) returns integer as '
declare
  codetype alias for $1;
  coderet integer;
begin
  select into coderet typnum from types
      where typcode = codetype and catcode = ''UV'';

why not -> select *typenum* into coderet from types where typcode = codetype and catcode = ''UV'';

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to [EMAIL PROTECTED] so that your
     message can get through to the mailing list cleanly

Reply via email to