198k views
0 votes
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?

1 Answer

1 vote

Answer:

The answer to this question can be given as:

Statement:

INSERT INTO First_table(Column name)

SELECT * FROM

Second_table(BULK 'C:\data\data.docx', SINGLE_BLOB) as file;

Explanation:

In the above statement firstly we use the insert command and select command. The insert command is used to insert data into table and Select command is used for return group of the data from one or more table in this command we use two parameter in the first parameter we use the bulk it is used for store data into a file and we pass the path of the file where data stored. In the second parameter, we use the single_blog. It is used to store the data into a single block and at the last, we define the file that stores data like a file. In this statement, we insert data into another file that stores the data into word file.

User Sebastien Windal
by
4.8k points