Don't know if this is possible. Have a table with just an ID and datetime so both are set with defaults.
CREATE TABLE [dbo].[tb_ErrorLog](
[errorLogID] [int] IDENTITY(1,1) NOT NULL,
[errorLogDate] [datetime] NOT NULL,
CONSTRAINT [PK_tb_ErrorLog] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [dbo].[tb_ErrorLog] ADD CONSTRAINT [DF_tb_ErrorLog_errorLogDate] DEFAULT (getdate()) FOR [errorLogDate]
All I want to do is to increment the table with a record every time a particular web page is reached.
So how do you write the INSERT statement without any passed values?