From the course: Developing Microsoft SQL Server 2016 Databases

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Store BLOB data in a table

Store BLOB data in a table

- [Instructor] SQL Server provides solutions for storing files and documents right inside of the database. One way is to take advantage of the varbinary max data type. Using this we can store documents and images and other files called blobs or binary large objects directly inside of a database table. To see this in action let's create a new database called binary large objects. Then we can use a function inside of SQL Server called open row set. Open row set will load bulk data from a file on our system. We'll specify that I want to select everything from the open row set function, then we'll specify bulk and the file path of the file that we're interested in. In my case it's a file inside of our chapter six exercise files called CompanyHistory.pdf. Unless your name happens to be Adam as well you're going to need to modify this file path to the location of your desktop on your computer. Then we'll specify that this…

Contents