List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:September 17 1999 8:26pm
Subject:Re: Just Wondering
View as plain text  
At 15:45, 19990917, John Torres wrote:
>Is there a function in mysql that is similar to dual
>in oracle.  for the use of an sequence?

You can use LAST_INSERT_ID() to simulate a sequence.  Look at the
manual listing for LAST_INSERT_ID() (under misc. select functions).
It has an example.  Basically you have to create the "dual" table
yourself, with one field and one row.


>select seq_name.nextval from dual;
>this would return the next value in the sequence for me to insert a
>customer or track an impression etc.
Just WonderingJohn Torres17 Sep
  • Re: Just WonderingJoel Bremson18 Sep
  • Re: Just WonderingThimble Smith18 Sep