更改SQL 2005的登陆方式
如果你的身份验证方式为Windows集成身份验证更改为混合方式的身份验证,需要在SQL Server Configuration Management中,把TCP/IP的活动启用,也就是第一个选择的地方,选择启用。并且使用集成身份验证方式登录后,在数据库服务器上选择属性,把安全性下的WINDOWS模式改为SQL与WINDOWS模式
相关文档:
可以定义一个无论何时用INSERT语句向表中插入数据时都会执行的触发器。
当触发INSERT触发器时,新的数据行就会被插入到触发器表和inserted表中。inserted表是一个逻辑表,它包含了已经插入的数据行的一个副本。inserted表包含了INSERT语句中已记录的插入动作。inserted表还允许引用由初始化INSERT语句而产生的日志数据 ......
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 ......
用sql操作oracle的blob字段
1、查询
select utl_raw.cast_to_varchar2(dlob),id from system.t_htinfo
2、插入
insert into system.t_htinfo values ('3',utl_raw.cast_to_raw('你'));
3、更新
update system.t_htinfo set fld_value=utl_raw.cast_to_raw('1') where fh_nm=1820648 and form_index=52
......
同一表多字段同时重复记录的SQL查询及处理数
比如现在有一人员表 (表名:peosons)
若想将姓名、身份证号、住址这三个字段完全相同的记录查询出来
select p1.* from persons p1,persons p2 where p1.idp2.id and p1.cardid = p2.cardid and p1.pname = p2.pname and p1.address ......
完全备份或日志备份虽说都有截断日志的功能,但是不会收缩日志文件的空间返回给操作系统.
如果你想将日志文件的空间返回给操作系统的话,只有一种方法,就是收缩数据库(选择日志文件)
ZT一个相关帖子,供参考!
物理日志文件:
这个比较好理解,实实在在的东西,数据库目录下面的.ldf文件就是,有些人喜欢改后 ......