Re: Best Way to Auto Increment with Oracle
From: Peter J. Holzer (hjp_at_wsr.ac.at)
Date: 06/16/04
- Next message: James Kipp: "RE: Best Way to Auto Increment with Oracle"
- Previous message: Jim: "Best Way to Auto Increment with Oracle"
- In reply to: Jim: "Best Way to Auto Increment with Oracle"
- Next in thread: Andy Crichton: "RE: Best Way to Auto Increment with Oracle"
- Reply: Andy Crichton: "RE: Best Way to Auto Increment with Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 16 Jun 2004 15:04:18 +0200 To: dbi-users@perl.org
On 2004-06-16 05:21:07 -0700, Jim wrote:
> I am looking for suggestions on the best way to auto
> increment a key column in a oracle table. I know I can
> do this inside of Oracle by creating a sequence and
> then a trigger. BUT, is it better to make DBI do this
> when I insert the data?
I guess that's a matter of taste.
> If so, how would I go about
$dbh->do("insert into foo(id, ...) values(foo_id_seq.nextval, ....)");
hp
-- _ | Peter J. Holzer | Shooting the users in the foot is bad. |_|_) | Sysadmin WSR / LUGA | Giving them a gun isn't. | | | hjp@wsr.ac.at | -- Gordon Schumacher, __/ | http://www.hjp.at/ | mozilla bug #84128
- application/pgp-signature attachment: stored
- Next message: James Kipp: "RE: Best Way to Auto Increment with Oracle"
- Previous message: Jim: "Best Way to Auto Increment with Oracle"
- In reply to: Jim: "Best Way to Auto Increment with Oracle"
- Next in thread: Andy Crichton: "RE: Best Way to Auto Increment with Oracle"
- Reply: Andy Crichton: "RE: Best Way to Auto Increment with Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|