Which Transact-SQL statement should you use?

You use a Microsoft SQL Server 2012 database.
You want to create a table to store Microsoft Word documents.
You need to ensure that the documents must only be accessible via Transact-SQL queries.
Which Transact-SQL statement should you use?

You use a Microsoft SQL Server 2012 database.
You want to create a table to store Microsoft Word documents.
You need to ensure that the documents must only be accessible via Transact-SQL queries.
Which Transact-SQL statement should you use?

A.
CREATE TABLE DocumentStore
(
[Id] INT NOT NULL PRIMARY KEY,
[Document] VARBINARY(MAX) NULL
)
GO

B.
CREATE TABLE DocumentStore
(
[Id] hierarchyid,
[Document] NVARCHAR NOT NULL
)
GO

C.
CREATE TABLE DocumentStore AS FileTable

D.
CREATE TABLE DocumentStore
(
[Id] [uniqueidentifier] ROWGUIDCOL NOT NULL UNIQUE,
[Document] VARBINARY(MAX) FILESTREAM NULL
)
GO

Explanation:
http://msdn.microsoft.com/en-us/library/gg471497.aspx
http://msdn.microsoft.com/en-us/library/ff929144.aspx



Leave a Reply 9

Your email address will not be published. Required fields are marked *


Don

Don

A correct,

Would be D if the files could be obtained in other way other than just query.

Durga Prasad Palepu

Durga Prasad Palepu

Thanks Don, nice explanation.

Novel R Purification

Novel R Purification

The question says that the documents must only be accessible via Transact-SQL queries, the right answer id A and not D.