From: Martijn Tonies Date: October 19 2004 11:23am Subject: Re: Sequences and Synomyms List-Archive: http://lists.mysql.com/mysql/174443 Message-Id: <02b201c4b5ce$1abcae80$0a02a8c0@martijn> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hello, > 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 > statement > > 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. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com