pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: bhavesh1385 <bhavesh.bece.13@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Want some basic compare of data type on PostgreSQL and MySQL
Date: Wed, 31 Aug 2011 22:15:08 -0700 (PDT)
Message-ID: <1314854108076-4757149.post@n5.nabble.com> (raw)

Hello All,

I Want some basic compare of data type on PostgreSQL and MySQL.

I am Try to using create the database on PostgreSQL with the same query on
MySQL then it will create a problem...

I have make changes according to the Datatype of PostgreSQL and below are
the syntax for the query.

Into MySQL the Syntax Look like :- 
---------------------------------
CREATE TABLE IF NOT EXISTS `tbl_admin` (
  `iadmin_id` int(11) NOT NULL AUTO_INCREMENT,
  `vemail` varchar(255) NOT NULL,
  `vname` varchar(255) NOT NULL,
  `irole_id` int(11) NOT NULL,
  `vpassword` varchar(255) NOT NULL,
  `estatus` enum('Active','InActive') NOT NULL,
  PRIMARY KEY (`iadmin_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;



So i want to execute the same query into PostgreSQL and i try the same query
but error occur..

and i correct the syntax of the query according to PostgreSQL as following 
------------------
CREATE TABLE tbl_admin1 (
  iadmin_id integer NOT NULL,
  vemail character varying,
  vname character varying,
  irole_id integer,
  vpassword character varying,
  PRIMARY KEY (iadmin_id)
)

---------------
NOTE :- Still I have some below confusion into following 

[1] How to make Primary Key as a Auto Increment...?
[2] Suppose I want to put 'ENUM' data type then how i can do that ..?
[3] Please suggest me basic Data type Comparesion between PostgreSQL and
MySQL .. like :-

          PostgreSQL              MySQL
---------------------------------------------
      characte varying         VARCHAR
         integer                      INT

like that i want all the possible data type comparision.


Thanks,
Bhavesh Patel
           


--
View this message in context: http://postgresql.1045698.n5.nabble.com/Want-some-basic-compare-of-data-type-on-PostgreSQL-and-MySQL...
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



view thread (6+ messages)  latest in thread

Message-ID: <1314854108076-4757149.post@n5.nabble.com>
Permalink:  ../1314854108076-4757149.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1314854108076-4757149.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bhavesh.bece.13@gmail.com
  Subject: Re: Want some basic compare of data type on PostgreSQL and MySQL
  In-Reply-To: <1314854108076-4757149.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox