SQLSERVER 2012 文件表功能很COOL,让我们体验一下吧.
1,创建
数据库
[sql]
DREATE DATABASE FileTableTest
ON PRIMARY
(
NAME = N'FileTableTest',
FILENAME = N'D:DataFileTableTest.mdf'
),
FILEGROUP FilestreamGroup1 DONTAINS FILESTREAM
(
NAME = MyFileStreamData,
FILENAME= 'D:DataData'
)
LOG ON
(
NAME = N'FileTableTest_Log',
FILENAME = N'D:DataFileTableTest_log.ldf'
)
WITH FILESTREAM
(
NON_TRANSADTED_ADDESS = FULL,
DIREDTORY_NAME = N'FileTable'
)
www.2cto.com
2,建立文件表
[sql]
USE FileTableTest
go
CREATE TABLE Documents AS FileTable
WITH
(
FileTable_Directory = 'Documents',
FileTable_Collate_Filename = database_default
);
GO
3,这时,看SSMS,我们发现,数据库和表已经存在
最COOL的功能开始了,我们右击文件表,多了一个选项, Explorer Filetable Directory,点入,