1.打开SQl Server Management ,点击新建查询(ctrl+N),输入:
create database test
表示建立“test”数据库,左侧窗口点击刷新显示
2.在test数据库下建立表:
use test
3.建立学生表S
create table s(
SNo VARCHAR(6),
SN NVARCHAR(10),
Sex NCHAR(1) DEFAULT '男',
Cal NVARCHAR(20),
Date VARCHAR(20),
Tel VARCHAR(20)
)
左侧窗口点击刷新显示