Help for this page

Select Code to Download


  1. or download this
    my $members = join("; ", @member);
    
  2. or download this
    select * from celebrities where professions like '% 002 %'
    
  3. or download this
    select * from celebrities 
    where professions='002'          -- The only item in the list
    or    professions like '002 %'   -- it might be first of several
    or    professions like '% 002'   -- it could be the last of several
    or    professions like '% 002 %' -- or in the middle
    
  4. or download this
    if 1 > (select count(*) from celebrities 
            where (professions='002' or professions like '002 %'
    ...
                                        else ' '||professions end
        where cel_id=X;
    end if;
    
  5. or download this
    select * from celebrities where cel_id in (
        select cel_id from celebrity_professions where prof_id='002'
    )
    
  6. or download this
    if 1 > (select count(*) from celebrity_professions where 
            prof_id='002' and cel_id=X
    ) then
       insert into celebrity_professions (cel_id, prof_id) values (X, '002
    +');
    end if;
    
  7. or download this
    delete celebrity_professions where cel_id=X and prof_id='002';
    
  8. or download this
    select * from celebrities where cel_id in (
        select cel_id from celebrity_groups where group_id in (
            select prof_id from celebrity_groups where cel_id=X
        )
    )