SQL整套学习资料.pdf
文本预览下载声明
第一章
奉献给 SQL初学者们的终极教材 上一篇 | 下一篇
页脚内容 1
第一章
此教材可以说涉及的范围是非常广的。。我们平常写的 SQL语句都是出
现在里面的。。且每一种方法都有案例,所以说如果你把所有的案例应用理解透
的话。。可以说你已经成为高手了。。知识都是得靠自己去掌握的。。多看,多
想。多问。多动手。相信你一定很快掌握的。。
use master
go
--创建数据库 book_manage
create database book_manage
on
(
name = book_manage_primary,
filename = d:\data\book_manage.mdf,
size = 10,
maxsize = 20,
页脚内容 2
第一章
filegrowth = 5
)
log on
(
name = book_manage_log,
filename = d:\data\book_manage.ldf,
size = 5,
maxsize = 20,
filegrowth = 5
)
go
--查看 book_manage数据库信息
exec sp_helpdb book_manage
--修改数据库日志文件扩展空间
页脚内容 3
第一章
alter database book_manage modify file
(
name = book_manage_log,
filegrowth = 5
)
--创建新表
use book_manage
go
create table tb_bookinfo
(
book_ID char(6) not null,
bookname char(30) not null,
price decimal(18,2) not null,
authorID char(4),
publishID char(4)
)
页脚内容 4
第一章
create table tb_authorinfo
(
authorID char(4) not null,
authorname char(20) not null,
sex char(2),
age tinyint,
authaddress char(30)
)
go
create table tb_pubinfo
(
publishID char(4) not null,
pubname char(20) not null,
pubaddress char(30)
)
create table temp1
页脚内容 5
第一章
(
temID char(4) not null,
显示全部