Home  >  Article  >  Database  >  SQL建立数据库及删除数据库命令

SQL建立数据库及删除数据库命令

WBOY
WBOYOriginal
2016-06-07 18:03:431184browse

SQL建立数据库及删除数据库命令,需要使用sqlserver的朋友可以参考下。

代码如下:
CREATE DATABASE 临时的
ON
( NAME='临时的_Data',
FILENAME='h:\临时的.mdf',
SIZE=5MB,
MAXSIZE=50MB,
FILEGROWTH=10%
)
LOG ON
(
NAME='临时的_LOG',
FILENAME='h:\临时的.ldf',
SIZE=2MB,
MAXSIZE=5MB,
FILEGROWTH=1MB
)

这样就在H盘建立了一个名字为 临时的.mdf,以及日志名称为 临时的.ldf的数据库文件,其中
NAME=逻辑名称
FILENAME=数据库的物理文件名称
SIZE=初始大小
MAXSIZE=数据库最大尺寸
FILEGROWTH=文件增长程度

删除数据库使用drop命令
drop database 临时的
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn