创建文件目录
use master
go
exec xp_cmdshell 'mkdir D:\ProductDB',no_output --在指定位置创建文件夹
if exists(select * from sysobjects where name='ProductDB')
drop database ProductDB
go
exec xp_cmdshell 'dir D:\ProductDB\' --查看文件
use master
go
exec xp_cmdshell 'mkdir D:\ProductDB',no_output --在指定位置创建文件夹
if exists(select * from sysobjects where name='ProductDB')
drop database ProductDB
go
exec xp_cmdshell 'dir D:\ProductDB\' --查看文件