CREATE FUNCTION dbo.ffff()
RETURNS datetime AS
BEGIN
declare @temp datetime
set @temp=(select getdate())
return @temp
END报错:在函数内不正确地使用了 'getdate'。
何解??
RETURNS datetime AS
BEGIN
declare @temp datetime
set @temp=(select getdate())
return @temp
END报错:在函数内不正确地使用了 'getdate'。
何解??
http://community.csdn.net/Expert/topic/4936/4936066.xml?temp=.864895
AS
SELECT GETDATE() as 'CURRDATE'
--
CREATE FUNCTION dbo.ffff()
RETURNS datetime AS
BEGIN
declare @temp datetime
set @temp=(select CURRDATE FROM GETDATES) --在函数内调用视图
return @temp
END