SQL Server 2008中怎么创建数据库
1个回答
展开全部
有两种方法:
1、登录 SSMS,在数据库节点上右键,弹出创建数据库的对话框。
2、使用代码
CREATE DATABASE Sales
ON
( NAME = Sales_dat,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\saledat.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = Sales_log,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\salelog.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB ) ;
GO
create table bas_role_tb (
id_role int identity,
role_code varchar(30) null,
role_name varchar(60) null,
del_flag tinyint null default 0,
oper_date datetime null default getdate(),
id_user int null,
remark varchar(600) null,
constraint bas_role_pk primary key (id_role)
)
go
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询