tsql - How do I insert a row in T-SQL where there are only auto-generated columns? -
i have table this:
create table [dbo].[traceable]( [traceable_id] [uniqueidentifier] not null constraint [df_traceable_traceable_id] default (newsequentialid()), constraint [pk_traceable] primary key clustered ( [traceable_id] asc )with (ignore_dup_key = off) on [primary] ) on [primary]
how insert row table? doesn't work:
insert traceable() values()
it errors on values()
clause (incorrect syntax near ')'). taking out brackets doesn't work either.
insert traceable default values;
or
insert traceable values (default);
Comments
Post a Comment