什么是postgresql等效类型的SQL" time"? [英] What is the postgresql equivalent type of SQL "time"?

查看:130
本文介绍了什么是postgresql等效类型的SQL" time"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我正在开发一个mvc c#项目,我们开始使用postgre sql而不是sql。我必须从sql转换为postgre sql的一个sql查询有一个类型为time(7)的列。记录如下:09:00:00.0000000。在sql中这种类型time的postgresql类型是什么?



我尝试了什么:



我试着查看一些文档,但没有找到合适的东西。

Hi, everyone. I am working on a mvc c# project, and we started to use postgre sql instead sql. One of the sql queries I had to translate from sql to postgre sql has a column with type "time(7)". The record is like this: "09:00:00.0000000". What is postgresql type for this type "time" in sql?

What I have tried:

I tried to look in some documentation but did not find anything appropriate.

推荐答案

在PostgreSQL中,Time(p)是一个时间类型精度为 p ,其中精度为正数

0-6的精确等级将时间存储为整数

级别7以上将把时间存储为浮点。



是(MS)SQL Server,类型将是相同的时间(p),但是;范围限制在0-7



PostgreSQL:文档:9.1:日期/时间类型 [ ^ ]

time(Transact-SQL) - SQL Server | Microsoft Docs [ ^ ]
In PostgreSQL, Time(p) is a Time type with a precision of p, where precision is a positive number
Precision levels of 0-6 will have the Time stored as an Integer
Levels 7 and above will store the Time as a floating point.

Is (MS) SQL Server, the type would be the same Time(p), however; the range is limited from 0-7

PostgreSQL: Documentation: 9.1: Date/Time Types[^]
time (Transact-SQL) - SQL Server | Microsoft Docs[^]


说真的,伙计。你怎么能帮忙但找不到适当的东西:



PostgreSQL:文档:9.1:日期/时间类型 [ ^ ]



日期和时间数据类型和函数(Transact-SQL) - SQL Server Microsoft Docs [ ^ ]
Seriously, dude. How can you NOT help but find something "appropriate":

PostgreSQL: Documentation: 9.1: Date/Time Types[^]

Date and Time Data Types and Functions (Transact-SQL) - SQL Server | Microsoft Docs[^]


这篇关于什么是postgresql等效类型的SQL" time"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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