如何将当前日期追加到数据库中的列? [英] how to append current date to a column in database ?
本文介绍了如何将当前日期追加到数据库中的列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这里我有我的程序,我的要求是显示当前日期。取代DIssolution日期。我已经从溶出列获取了一些数据,而不是我想要显示当前日期。如何用getdate()函数替换它。
here i have my procedure and i my requirement is to display current date. in place of DIssolution date. i am already getting some data from dissolution column instead of that i want display current date. how to replace it with getdate() function.
推荐答案
如果不查看存储过程,很难回答。这可以提供帮助:
Without looking at your stored procedure it is tough to answer. Here is what could help:
select [other columns], getdate() "dissolution" from [table name]
而不是DIssolution
列使用getdate()作为[DIssolution]
ie:
Instead of theDIssolution
column usegetdate() as [DIssolution]
i.e. :
select col1,col2,col3,DIssolution from tablename
select col1.col2,col3, getdate() as [DIssolution] from tablename
这篇关于如何将当前日期追加到数据库中的列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文