nod
insert into [dbo].[ConsumableStatistics] (ordertime,.......)(getdate(),........)

解决方案 »

  1.   

    把 OrderTime 默認值設為  getdate()  , 添加資料時不用管這個欄位就行了。
      

  2.   

    CREATE TRIGGER [TRIGGER NAME] ON [dbo].[ConsumableStatistics] 
    FOR INSERT
    AS  update [dbo].[ConsumableStatistics] set ordertime=getdate() where 编号 in (select 编号 from inserted)
      

  3.   

    把你这个字段设置默认值为读取服务器端的时间 getdate(),每次插入数据的时候不插入这个字段就行了,没必要做出发器啊。
      

  4.   

    insert into [dbo].[ConsumableStatistics] (ordertime,.......)(getdate(),........)
    or 
    把 OrderTime 默认值 设为  getdate(),我就是这么做的