数据库系统及应用实验与课程设计指导SQL2008.doc 立即下载
2024-08-03
约1.1万字
约16页
0
88KB
举报 版权申诉
预览加载中,请您耐心等待几秒...

数据库系统及应用实验与课程设计指导SQL2008.doc

数据库系统及应用实验与课程设计指导SQL2008.doc

预览

免费试读已结束,剩余 11 页请下载文档后查看

10 金币

下载文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

select*fromsys.servers
whereserver_id=0
select*fromsys.databases
select*fromsys.filegroups
select*fromsys.master_files
select*fromsys.database_files
select*fromsys.data_spaces

createtabletest
(
idintnotnull,
namechar(100)null,
constraintpk_testprimarykeyclustered(idasc)
)
createnonclusteredindexix_testontest(name)

select*
fromsys.objects
wheretype_desc='user_table'andname='test'

select*fromsys.objects
wheretype_desc='user_table'andname='test'orparent_object_idin
(selectobject_idfromsys.objects
wheretype_desc='user_table'andname='test')

select*fromsys.columns
whereobject_id='12'

select*fromsys.indexes
whereobject_id='12325345'

select*fromsys.partitions
whereobject_id='12325345'

select*fromsys.allocation_units

select*fromsys.allocation_unitsu,sys.partitionsp
whereu.typein(1,3)andu.container_id=p.hobt_idandp.object_id='33'
unionall

select*fromsys.allocation_unitsu,sys.partitionsp
whereu.type=2andu.container_id=p.partition_idandp.object_id='33'

select*fromsys.dm_db_partition_stats
whereobject_id='33'

select*fromsys.index_columns
whereobject_id='11'

select*fromsys.database_principals

select*fromsys.types



--数据库的创建
createdatabaseeduc
onprimary
(
name=student_data,
filename='C:\ProgramFiles\MicrosoftSQLServer\MSSQL.1\MSSQL\DATA\student_data.mdf',
size=10MB,
maxsize=50MB,
filegrowth=1MB
)
logon
(
name=student_log,
filename='C:\ProgramFiles\MicrosoftSQLServer\MSSQL.1\MSSQL\DATA\student_log.ldf',
size=2MB,
maxsize=5MB,
filegrowth=1%
)

--创建测试数据
useeduc
go
createtablestudent(svarchar(10),snamenvarchar(10),sagedatetime,ssexnvarchar(10))
insertintostudentvalues('01',N'赵雷','1990-01-01',N'男')
insertintostudentvalues('02',N'钱电','1990-12-21',N'男')
insertintostudentvalues('03',N'孙风','1990-05-20',N'男')
insertintostudentvalues('04',N'李云','1990-08-06',N'男')
insertintostudentvalues('05',N'周梅','1991-12-01',N'女')
insertintostudentvalues('06',N'吴兰','1992-03-01',N'女')
insertintostudentvalues('07',N'郑竹','1989-07-01',N'女')
insertintostudentvalues('08',N'王菊','1990-01-20',N'女')
cr
查看更多
单篇购买
VIP会员(1亿+VIP文档免费下)

扫码即表示接受《下载须知》

数据库系统及应用实验与课程设计指导SQL2008

文档大小:88KB

限时特价:扫码查看

• 请登录后再进行扫码购买
• 使用微信/支付宝扫码注册及付费下载,详阅 用户协议 隐私政策
• 如已在其他页面进行付款,请刷新当前页面重试
• 付费购买成功后,此文档可永久免费下载
全场最划算
12个月
199.0
¥360.0
限时特惠
3个月
69.9
¥90.0
新人专享
1个月
19.9
¥30.0
24个月
398.0
¥720.0
6个月会员
139.9
¥180.0

6亿VIP文档任选,共次下载特权。

已优惠

微信/支付宝扫码完成支付,可开具发票

VIP尽享专属权益

VIP文档免费下载

赠送VIP文档免费下载次数

阅读免打扰

去除文档详情页间广告

专属身份标识

尊贵的VIP专属身份标识

高级客服

一对一高级客服服务

多端互通

电脑端/手机端权益通用