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 (N AME = N''Northwind_log'', FILENAME = N''' + @device_directory + N'northwnd.ldf'')') go
用户评论
Northwind原汁原味