我刚刚创建了这张表:
create table dbo.OrderTypes
(
ID smallint primary key identity,
Name varchar(300) not null,
CreatedOn datetime default getdate(),
CreatedBy nvarchar(300) not null,
ModifiedOn datetime default getdate(),
ModifiedBy nvarchar(300) not null
)
我要做的是使用此查询的结果填充名称字段:
select distinct ordertype from unit_results
以及手动插入 CreatedBy 和 ModifiedBy (它们对于每一行都是相同的)。
我该怎么做呢?