注意:此页面搜索的是所有试题
题目内容 (软件工程)
你的任务是创建名为dbo.Widgets的表。你需要将五行插入dbo.Widgets表,并返回插入的每一行的WidgetID。 应使用哪个Transact-SQL批处理?
A.CREATE TABLE dbo.Widgets ( WidgetID INT
IDENTITY PRIMARY KEY, WidgetName VARCHAR (25));
GO
INSERT
dbo.Widgets (WidgetName) OUTPUT inserted.WidgetID, inserted.WidgetName VALUES
(.WidgetOne.),(.WidgetTwo.),(.WidgetThree.),(.WidgetFour.),(.WidgetFive.);
B.CREATE
TABLE dbo.Widgets ( WidgetID INT IDENTITY PRIMARY KEY, WidgetName VARCHAR (25)
);
GO
INSERT
dbo.Widgets (WidgetName) VALUES
(.WidgetOne.),(.WidgetTwo.),(.WidgetThree.),(.WidgetFour.),(.WidgetFive.);
SELECT SCOPE_IDENTITY();
C.CREATE
TABLE dbo.Widgets ( WidgetID UNIQUEIDENTIFIER PRIMARY KEY, WidgetName
VARCHAR(25) );
GO
INSERT dbo.Widgets (WidgetName) VALUES
(.WidgetOne.),(.WidgetTwo.),(.WidgetThree.),(.WidgetFour.),(.WidgetFive.);
SELECT SCOPE_IDENTITY();
D.CREATE
TABLE dbo.Widgets ( WidgetID UNIQUEIDENTIFIER PRIMARY KEY, WidgetName
VARCHAR(25));
GO
INSERT
dbo.Widgets (WidgetName) OUTPUT inserted.WidgetID, inserted.WidgetName VALUES
(.WidgetOne.),(.WidgetTwo.),(.WidgetThree.),(.WidgetFour.),(.WidgetFive.);

参考答案