摘要:
用来创建独一无二的,只能有一个实例的对象。Ensure a class has only one instance and provide a global point of access to it.有些对象我们只需要一个实例,例如线程池、缓存、处理偏好设置和注册表对象、日志对象、充当打印机、显卡等设备的驱动程序对象。如果制造出多个实例,就会导致许多问题产生,例如:程序的行为异常、资源使用过量,... 阅读全文
摘要:
转自http://sqlblog.com/blogs/peter_debetta/archive/2007/03/09/t-sql-convert-hex-string-to-varbinary.aspxSQL Server 2005中有一个没有文档说明的函数sys.fn_varbintohexstr,函数可把十六进制数转换为字符串表示的十六进制数(例如0x3a转换为'0x3a'),但是并没有函数... 阅读全文
摘要:
SELECT * FROM sys.sysobjects WHERE xType = 'U' ORDER BY name ASCxType类型AF = Aggregate function (CLR)C = CHECK constraintD = DEFAULT (constraint or stand-alone)F = FOREIGN KEY constraintFN = SQL scalar... 阅读全文