| View previous topic :: View next topic |
| Author |
Message |
s.nagesh
Joined: 23 Jul 2007 Posts: 131
|
Posted: Tue Jun 15, 2010 10:32 am Post subject: Variation of declaring data types in various database |
|
|
Hi to all,
Based on my previous experience i collected some of the datatypes declaration in some databases. Because while executing rake db:migrate many times i have faced few problems due to declaration of datatype of the each column.
Type Postgresql sqlite sqlserver sybase
-------------------------------------------------------------------------------------
:binary bytea blob image image
:boolean boolean boolean bit bit
:date date date datetime datetime
:datetime timestamp datetime datetime datetitme
:decimal decimal decimal decimal decimal
:float float float float(8) float(8)
:integer integer integer int int
:string (note 1) varchar(255) varchar(255) varchar(255)
:text text text text text
:time time datetime datetime time
:timestamp timestamp datetime datetime timestamp
Hope this will help you.
Thanks |
|
| Back to top |
|
 |
sravish
Joined: 04 Sep 2007 Posts: 26
|
Posted: Tue Jun 15, 2010 11:37 am Post subject: |
|
|
Its really helpful for the developers who are working with multiple databases. But if you posted the data-types for other databases like mysql, oracle..etc its really good. Just its my suggestion.
Thanks |
|
| Back to top |
|
 |
s.nagesh
Joined: 23 Jul 2007 Posts: 131
|
Posted: Tue Jun 15, 2010 12:17 pm Post subject: |
|
|
Here is the datatypes for remaining database
Type DB2 mysql openbase oracle
-------------------------------------------------------------------------------------
:binary blob(32768) blob object blob
:boolean decimal(1) tinyint(1) boolean number(1)
:date date date date date
:datetime timestamp datetime datetime date
:decimal decimal decimal decimal decimal
:float float float float number
:integer int int(11) integer number(38)
:string varchar(255) varchar(255) char(4096) varchar2(255)
:text clob(32768) text text clob
:time time time time date
:timestamp timestamp datetime timestamp date
|
|
| Back to top |
|
 |
Gary45
Joined: 13 Jul 2010 Posts: 1
|
Posted: Tue Jul 13, 2010 2:15 pm Post subject: |
|
|
Thank you a lot for the information
________________
|
|
| Back to top |
|
 |
|