如何没有输入参数SQL功能参数
即时通讯歌厅一个错误下面的代码创建一个SQL函数
create function function_name
RETURN datetime AS
BEGIN
DECLARE @var datetime
SELECT @var=CURRENT_TIMESTAMP
RETURN @var
END
错误
>
> Msg 156, Level 15, State 1, Procedure
> fx_getcurrent_date, Line 2 Incorrect
> syntax near the keyword 'RETURN'. Msg
> 178, Level 15, State 1, Procedure
> fx_getcurrent_date, Line 7 A RETURN
> statement with a return value cannot
> be used in this context.