1---利用SQL语言实现数据库的建立,删除

--建立数据库
create database Stu
on primary
(
name = 'Stu_data',
filename ='F:\SQL_Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Stu_data.mdf',
size = 3mb,
maxsize=100mb,
filegrowth = 10%
)


log on
(
name = 'Stu_log',
filename = 'F:\SQL_Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Stu_log.ldf',
size=2mb,
filegrowth = 1mb
)




--删除数据库
if exists(select * from sysdatabases where name = 'Stu')
drop database Stu

你可能感兴趣的:(SQL,Server)