我有这个代码:
IF EXISTS (SELECT * FROM sys.sysdatabases WHERE name='MyDatabase')
begin
DROP database MyDatabase
end
Go
CREATE DATABASE MyDatabase
但我在执行此查询后看到此错误:
无法创建文件“C:\Program Files\Microsoft SQL Server\MSSQL10.FARASQL\MSSQL\DATA\MyDatabase.mdf”