随笔分类 -  MSSQL

对MS SQL中bit字段进行统计
摘要:bit数据库字段不能使用sum等数学统计公式,将其通过cast函数转化为tinyint类型就可以用 例:select sum(cast(m0101 as tinyint)) from table1 阅读全文
posted @ 2007-11-22 14:58 cheerwen 阅读(493) 评论(0) 推荐(0)
Microsoft SQL Server自制加密函数介绍
摘要:总结前人经验,在此基础上介绍一下MSSQL一个自制的加密函数。 加密函数:pwdencrypt('原始密码') 对比较加密内容:pwdcompare('原始密码', '加密密码', 0) 返回结果:1——相等,0——不相等举例:INSERT INTO Table1 (password) values (CONVERT(varbinary(255),pwd... 阅读全文
posted @ 2006-07-20 12:10 cheerwen 阅读(794) 评论(0) 推荐(0)