I have a table that has a datetime column that I wish to insert multiple records into at the same time. It is necessary that the datetime is exactly the same so I can late compare which records were inserted together. Is it sufficient to do something like this:
INSERT INTO Table(Date, ID, etc...)
VALUES (GETDATE(), ...)
GETDATE() is evaluated once per query. There's no need to declare a variable.