Home >Database >Mysql Tutorial >SQL Server不能使用GETDATE()

SQL Server不能使用GETDATE()

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 14:57:222702browse

无详细内容 无 SQLServer的自定义函数限制很大,其中一条就是不能使用不确定函数。其中就包括getdate()。如果你非要在函数中得到getdate(),有如下办法:定义一个视图create view v_getdateasselect getdate() as now_date然后在函数中就可以:select now

SQLServer的自定义函数限制很大,其中一条就是不能使用不确定函数。
其中就包括getdate()。

如果你非要在函数中得到getdate(),有如下办法:
定义一个视图
create view v_getdate
as
select getdate() as now_date

然后在函数中就可以:
select now_date from v_getdate

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn