in reply to Handling Null or Undef values in DBI (and things of those nature)...
I hope this info can help you with your 2nd
question.
Off the top of my head there are aleast 3 ways
to check the table before you insert a new record.
way one) would be to define a unique constraint
on this table in the DBMS. This will prevent any
insertion of a record that is a duplicate.
way two) would be to define a before insert trigger
and have this trigger check for a duplicate.
way three) execute the query select count(*) into n from ...
and if n > 0 then the record exist.
--
Its like a dog that can sing and dance.
It's remarkable because it can do it.
Not that it can do it well.
question.
Off the top of my head there are aleast 3 ways
to check the table before you insert a new record.
way one) would be to define a unique constraint
on this table in the DBMS. This will prevent any
insertion of a record that is a duplicate.
way two) would be to define a before insert trigger
and have this trigger check for a duplicate.
way three) execute the query select count(*) into n from ...
and if n > 0 then the record exist.
--
Its like a dog that can sing and dance.
It's remarkable because it can do it.
Not that it can do it well.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Handling Null or Undef values in DBI (and things of those nature)...
by data67 (Monk) on Jan 08, 2002 at 05:10 UTC | |
Re: Re: Handling Null or Undef values in DBI (and things of those nature)...
by rbc (Curate) on Jan 09, 2002 at 02:28 UTC |
In Section
Seekers of Perl Wisdom