INSERT INTO [AdventureWorks].[dbo].[ErrorLog]
([ErrorTime]
,[UserName]
,[ErrorNumber]
,[ErrorMessage]
)
VALUES
(GetDate() --This will work for MSSQL
,'userName'
,7551
,'I inserted the current date/Time'
)
или (снова для SQL-сервера)
ALTER TABLE dbo.ErrorLog ADD CONSTRAINT
DF_ErrorLog_ErrorTime_current_DateTime DEFAULT (getdate()) FOR ErrorTime)