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-tp4757149p4757149.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to