Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Going from Oracle to Mysql

Re: Going from Oracle to Mysql

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 12 Aug 2002 15:26:27 GMT
Message-ID: <3D57D398.51B98DC8@exesolutions.com>


cg wrote:

> In mysql I have created the following table:
>
> CREATE TABLE Emp(
> EmpNr INTEGER NOT NULL AUTO_INCREMENT,
> Name varchar(30) NOT NULL,
> Adr varchar(30) NOT NULL,
> zip INTEGER NOT NULL,
> city varchar(30) NOT NULL,
> phone varchar(20) NOT NULL,
> Email varchar(30),
> Password varchar(40) NOT NULL,
> PRIMARY KEY(EmpNr));
>
> The first element, EmpNr, has an auto_increment variable attached to it.
>
> Now, in Oracle, I would use a a statement like the following in order
> to insert into a table with a sequence attached to it:
>
> insert into Emp values (Unik.nextval,?,?,?,?,?,?,?)
> (used for a preparedStatement in the database)
>
> What would the corresponding query look like in mysql??
>
> Also I would like to know what the following query looks like in mysql:
>
> select AddedEmp.currval from Emp
> (when the sequence in Oracle looks like
> create sequence AddedEmp increment by 1;)
>
> ??
>
> Any help is very much appreciated!
>
> ps please do also send to my email address in the response.

What is going on here? Several questions about MySQL in the last few days. Which part of the fact that the name of these usenet groups is comp.databases.ORACLE is escaping you folks?

  1. We don't know.
  2. We don't care.
  3. You made the choice to use a product lacking in support, lacking in documentation, lacking in usenet groups. No us.

Daniel Morgan Received on Mon Aug 12 2002 - 10:26:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US