windows 2003下安装 sql server 2000的方法
我安装的是sql server 2000四合一版本,正常途径直接安装是装不上的,要打什么SP3补丁,不要理它,打开安装包,里边有个MSDE目录,执行setup.exe,安装很顺利,装完之后是没有反应的,重启计算机,然后能看到sql server服务已经启动,这样,就可以正常安装了,执行安装包根目录下的安装程序,按提示一步步的走,就可以顺利安装了
相关文档:
例 34 找出年龄超过平均年龄的学生姓名。
SELECT SNAME
from STUDENTS
WHERE AGE >
(SELECT AVG(AGE)
from STUDENTS)
例 35 找出各课程的平均成绩,按课程号分组,且只选择学生超过 3 人的课程的成 ......
--1.关于where筛选器中出现指定星期几的求解
SQL code
--环境
create table test_1
(
id int,
value varchar(10),
t_time datetime
)
insert test_1
select 1,'a','2009-04-19' union
select 2,'b','2009-04-20' union
select 3,'c','2009-04-21' union
select 4,'d','2009-04-22' union
s ......
merge [target] t
using [source] s on t.id = s.id
when matched then update t.name = s.name, t.age = s.age -- use "rowset1"
when not matched then insert values(id,name,age) -- use "rowset2"
when source not matched then delete; -- use "rowset3"
MERGE dbo.table AS im ......
Use DatabaseName
--DB shrink
--获取database 空余空间, 决定是否作shrinkDB
exec [DBNAME].dbo.sp_spaceused
DBCC ShrinkDB(DBNAME)
--Log file shrink
Use DatabaseName
GO
Alter Database DatabaseName Set Recovery Simple
GO
Alter Database DatabaseName Set Recovery Full
GO
DBCC SHRINKFILE ('Log ......