From: | bhavesh1385 <bhavesh(dot)bece(dot)13(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Want some basic compare of data type on PostgreSQL and MySQL |
Date: | 2011-09-01 05:15:08 |
Message-ID: | 1314854108076-4757149.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2011-09-01 09:16:23 | Re: Want some basic compare of data type on PostgreSQL and MySQL |
Previous Message | Viktor Bojović | 2011-08-31 22:21:22 | Re: function based index problem |