更改SQL 2005的登陆方式
如果你的身份验证方式为Windows集成身份验证更改为混合方式的身份验证,需要在SQL Server Configuration Management中,把TCP/IP的活动启用,也就是第一个选择的地方,选择启用。并且使用集成身份验证方式登录后,在数据库服务器上选择属性,把安全性下的WINDOWS模式改为SQL与WINDOWS模式
相关文档:
drop table father;
create table father(
id int identity(1,1) primary key,
name varchar(20) not null,
age int not null
)
drop table mother;
create table mother(
id int identity(1,1),
name varchar(20) not null,
age int not null,
husban ......
例如问题:现在你面对一张表 table1 , table1中有个字段为sales_salary ,在数据库存放的字段为int 类型 。
要求,你统计的结果单位(万元),保留2位小数。并且会有这样的等式 (1行+2行=3行=7行+8行) 面对这样的问题,解决的方案有很多。比如,你可以通过视图的方案来解决,或控制输入域 ...
但有一种等效控制输入 ......
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 ......
今天,遇到了这样的一个例子:
SQL Server索引统计信息未及时更新,导致排序混乱
我们知道,在sql
server上创建索引后,同时会对该索引上的值进行排序,但对于新增加的值,如果未能及时更新统计信息,将有可能导致排序的混乱,也就是没有排序。
这是产生问题的语句:
Select * from V_L_IcStockProInEntry Where FInt ......
用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
......