Task:
I want to assign the current time to a field in a database. What is the Now or Now () statement called SQL Server Transact.
Solution:
With CURRENT_TIMESTAMP you take over the time, which runs on the SQL server.
INSERT INTO [dbo].[tbl_User_Sums] ([IDUser] ,[dtStart] ,[dtEnd] ,[SumViews_Content] ,[SumViews_Self] ) VALUES (123 ,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP ,0,1) |
In SQL Server Management Studio, the new values are displayed as here
CURRENT_TIMESTAMP = 2018-05-17 13: 44: 59.820 in milliseconds
Transact commands
Sql Synstax