我有这个 SQL 语句
INSERT housingSurvey ([nameID], [houseID], [jobID], [Active], [comment], [needsMaintenance], [lastUpdateDate)
VALUES (@NAMEID, @HOUSEID, @JOBID, 1, @DUEDATE, @COMMENT, NULL, @LASTUPDATEDATE)
我试过这个存储过程,但我没有得到当前日期。
CREATE PROCEDURE housingSurveyS(
@NAMEID INT,
@HOUSEID INT,
@JOBID INT,
@COMMENT BIT,
@DUEDATE NVARCHAR,
CURRENTTIME)
AS
BEGIN
INSERT INTO housingSurvey(
[nameID],
[houseID],
[jobID],
[Active],
[comment],
[dueDate],
[needsMaintenance],
[lastupdatedate])
VALUES (
@NAMEID,
@HOUSEID,
@JOBID,
1,
@COMMENT,
@DUEDATE,
NULL,
@LASTUPDATEDATE)
END
请你看看我做错了什么。谢谢
更新 我将它 CURRENTTIME 更改为 DATETIME 作为参数以将当前日期插入 [lastupdatedate] ...它仍然无法正常工作...