数据库学习日志1


create database Book1;
use Book1;
create table t_Book(
	bookNo int primary key identity(1,1),
	bookName varchar (100),
);


create database test1
on 
(
	name="test1",
	filename="D:\DB\test1.mdf",
	size=3MB,
	maxsize=1024MB,
	filegrowth=10%
)
LOG ON
(
	name="test_log",
	filename="D:\DB\test1_log.ldf",
	size=1MB,
	maxsize=1024MB,
	filegrowth=1MB
);


create database book;
use book;
create table t_book(
	bookNo int primary key identity(1,1),
	bookName varchar (300),
	bookAuthor varchar (500)
);
insert into t_book(bookName,bookAuthor) values('活着','余华');
insert into t_book(bookName,bookAuthor) values('西游记','罗贯中');
select * from t_book;
create database wage;//未完,,,待续……
use wage;
create table User(
	Userid int primary key identity(10001,1)not null,
	Pwd nvarchar (100)not null,
	Nickname nvarchar (10) not null,
	Sex int,
	Birthday datetime,
	Currstate int,
	friendshippolicy int
);

create table State(
	Stateid int primary key identity(1,1) not null,
	spname varchar (20)
);




create database test1
on 
(
	name="test1",
	filename="D:\DB\test1.mdf",
	size=3MB,
	maxsize=1024MB,
	filegrowth=10%
)
LOG ON
(
	name="test_log",
	filename="D:\DB\test1_log.ldf",
	size=1MB,
	maxsize=1024MB,
	filegrowth=1MB
);




你可能感兴趣的:(数据库学习)