易截截图软件、单文件、免安装、纯绿色、仅160KB

Sql Mobile 数据库开始之前的一点问题总结

1、安装Sql Server2005 Mobile Edition;
2、具体在创建一个工程以后,想使用SqlServerCe必须在自己工程的引用里面添加一个dll才行;
其目录在:C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\System.Data.SqlServerCe.dll
添加了以后就可以使用Mobile的一些数据库操作的类库了。


相关文档:

Merge SQL 2008

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 ......

Shrink SQL Server 2008 Database + Log File Script

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操作oracle的blob字段

用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查询每行中最大值的技巧

--------------------------------------------------------------------------
--  Author : htl258(Tony)
--  Date   : 2010-04-23 08:08:36
--  Version:Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
--          Jul  ......

DateTime类型的数据SQL语句转换

以下转载,原文摘自http://www.cnblogs.com/fubeidong/archive/2007/07/06/526247.html
数据库中有个字段叫orderTime,是DateTime类型的数据,如果我们用以下SQL语句把它取出来:
select
orderTime
from orders
则会把时间都显示出来,而如果改成下面的SQL语句:
select
orderTime = convert(varchar(10),orderTime, ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号