> I am new to mysql. I want to create sequences in mysql 4.0 which
> should be equivalent to oracle sequences. I gone through the mysql
> manual, Auto_Increment(), C API mysql_insert_id() and LAST_INSERT_ID()
> are there for sequences. Last_insert_id() gives the last value.
> I want actual migration to mysql for the following oracle statement
> create sequence msdba.ms_sequence maxvalue 100000000 cycle order;
> Could you please suggest how to do it.
MySQL doesn't support sequences. It supports auto-inc fields only.
> And also I want to create synonym in mysql for the following oracle
> create synonym msuser.ms_sequence for msdba.msuser_sequence;
Not supported in MySQL. When using MyISAM, you can probably
create a symbolic link of some sorts (in the file system, not MySQL
itself), but nothing like a real synonym.
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL