1、说明:创建数据库 CREATE DATABASE database-name CREATE DATABASE [credit] ON PRIMARY ( NAME = 'credit', FILENAME='D:/Program Files/Microsoft SQL Server/MSSQL/data/credit.mdf', SIZE=10240KB, MAXSIZE = UNLIMITED,FILEGROWTH = 10%) LOG ON ( NAME='test_log',FILENAME='D:/Program Files/Microsoft SQL Server/MSSQL/data/credit_log.ldf',SIZE=1024KB,MAXSIZE = 5120KB,FILEGROWTH = 1024KB ) GO
2、说明:删除数据库 drop database dbname USE master
SET nocount ON
GO IF db_id('credit') IS NOT NULL
DROP DATABASE credit
GO