SQL Server 9.0(2005)及更高版本PostgreSQL数据类型 [英] SQL Server 9.0 (2005) & PostgreSQL Data Types

查看:166
本文介绍了SQL Server 9.0(2005)及更高版本PostgreSQL数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VB.net和SQL Server 9构建一个复本,但将来它会与PostgreSQL(由另一个开发人员)兼容,所以我的问题是,是否有人知道SQL Server中的数据类型" 9我必须使用它来保持与PostgreSQL的兼容性,这样,当转换的时候到了,我不必修改每个表上的数据类型".

任何帮助将不胜感激.

解决方案

在我发帖时,您一定已经找到了解决问题的答案,但是这篇文章可能会对同样情况下的其他人有所帮助.没有:

十进制(您可以尝试使用数字)
钱,smallmoney (您可以尝试使用Numeric(19,4)或使用money(16,2))
图片
时间戳(您可以尝试先在"sql server"中将其转换为日期时间)
sql_variant
(布尔值)
datetime,smalldatetime (在postgresql中查找时间戳数据类型,并使用您认为更好的一种)为您提供数据)






Hi,

I´m building an aplication with VB.net and SQL Server 9, but in the future it will be compatible with PostgreSQL (by another developer), so my question is, if anyone knows what "data types" in SQL Server 9 i must use to maintain compatibility with PostgreSQL, so that when the time come for the conversion i don t have to chage the "Data Types" on each table.

Any help would be apreciated.

解决方案

At the time I posted you must have had the answer for the problem, but this post could be helpful for other people in the same situation..


Data Types that "Postgre SQL" doesn't have:

decimal (You can try with Numeric)
money, smallmoney (You can try with Numeric(19,4) or use money(16,2))
Image
timestamp (You may try converting first to a datetime in your "sql server")
sql_variant
bit (boolean)
datetime, smalldatetime (find timestamp datatype's in postgresql and use the one you  think is better for your data)




regards,


这篇关于SQL Server 9.0(2005)及更高版本PostgreSQL数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆