How do I paste with DATETIME now inside SQL Server mgmt studio

I have a website that inserts into this table below. I need to do some manual insertions, but I was not sure how to get through the equivalent of DateTime.Now in C #.

I run this below from the query editor in sql server mgmt studio. In any case, at this point in time in this request will pass.

INSERT INTO [Business] ([IsDeleted] ,[FirstName] ,[LastName] ,[LastUpdated] ,[LastUpdatedBy]) VALUES (0, 'Joe', 'Thomas', ,<LastUpdated, datetime,> ,<LastUpdatedBy, nvarchar(50),>) 
+57
datetime sql-server
Jun 18 2018-10-18
source share
2 answers

Use CURRENT_TIMESTAMP (or GETDATE () in archaic versions of SQL Server).

+107
Jun 18 '10 at 18:05
source share

Just use GETDATE() or GETUTCDATE() (if you want to get the "universal" UTC time, not the time associated with the time zone of your local server).

 INSERT INTO [Business] ([IsDeleted] ,[FirstName] ,[LastName] ,[LastUpdated] ,[LastUpdatedBy]) VALUES (0, 'Joe', 'Thomas', GETDATE(), <LastUpdatedBy, nvarchar(50),>) 
+23
Jun 18 '10 at
source share



All Articles