On Thu, Jan 10, 2002 at 02:48:26PM -0000, Matthew Darcy wrote:
> 
> in Oracle I have a test database. there are 2 tables table1 and
> table2.
> 
> there is a field on both tables called account_number. on table 1 it
> is set to auto increment.
> 
> I have set up a trigger so that when a number is generated in table1
> it copies the number to account_number on table 2.
> 
> Can this be done in mysql and how ?

MySQL does not yet have triggers, no.  You'd have to code this in your
application logic, probably using the LAST_INSERT_ID() value.

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 7 days, processed 190,959,604 queries (288/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to