文件名称:Northwind脚本
文件大小:2MB
文件格式:SQL
更新时间:2016-08-08 11:39:25
Northwind
/* ** Copyright Microsoft, Inc. 1994 - 2000 ** All Rights Reserved. */ SET NOCOUNT ON GO USE master GO if exists (select * from sysdatabases where name='Northwind') drop database Northwind go DECLARE @device_directory NVARCHAR(520) SELECT @device_directory = SUBSTRING(filename, 1, CHARINDEX(N'master.mdf', LOWER(filename)) - 1) FROM master.dbo.sysaltfiles WHERE dbid = 1 AND fileid = 1 EXECUTE (N'CREATE DATABASE Northwind ON PRIMARY (NAME = N''Northwind'', FILENAME = N''' + @device_directory + N'northwnd.mdf'') LOG ON (NAME = N''Northwind_log'', FILENAME = N''' + @device_directory + N'northwnd.ldf'')') go