错误是Sql日期时间溢出我无法理解可以任何正文解释 [英] Error Is Sql Date Time Overflow I Can't Understood That Can Any Body Explain
本文介绍了错误是Sql日期时间溢出我无法理解可以任何正文解释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在sql中设置了datetime列,默认为getdate()但是我有goto插入一行它会显示错误是
SqlDateTime溢出。必须在1/1/1753 12:00:00 AM和12/31/9999 11:59:59之间
我无法理解这个任何身体请帮助我
i have set datetime column in sql defaultly getdate() but i have goto insert a row it will be show the Error is
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59
I cant understood this any body help me please
推荐答案
奇怪 - 我只是使用我的系统检查它,它工作正常:
Odd - I just checked it using my system, and it works fine:
USE [Testing]
GO
/****** Object: Table [dbo].[Users] Script Date: 02/12/2015 17:28:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Users](
[id] [int] IDENTITY(1,1) NOT NULL,
[Email] [nvarchar](max) NOT NULL,
[dt] [datetime] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Users] ADD CONSTRAINT [DF_User_dt] DEFAULT (getdate()) FOR [dt]
GO
id Email dt
1 MyUser 2015-02-12 17:27:48.127
那么我在做什么与你有什么不同?
So what am I doing that differs from you?
这篇关于错误是Sql日期时间溢出我无法理解可以任何正文解释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文