随笔分类 -  SQL

摘要:-- ============================================= -- Author: -- Create date: -- Description:sql函数实现C#Split的功能 -- ============================================= set ANSI_NULLS ON set QUOTED_IDENTIFIER... 阅读全文
posted @ 2009-01-15 12:33 share your knowledge with the world! 阅读(282) 评论(0) 推荐(0)
摘要:格式: CONVERT(data_type,expression[,style]) 说明: 此样式一般在时间类型(datetime,smalldatetime)与字符串类型(nchar,nvarchar,char,varchar) 相互转换的时候才用到. 例子: SELECT CONVERT(varchar(30),getdate(),101) now 结果为: now -----------... 阅读全文
posted @ 2009-01-13 17:26 share your knowledge with the world! 阅读(578) 评论(1) 推荐(0)
摘要:表结构和数据 year month amount 1991 1 1.1 1991 2 1.2 1991 3 1.3 1991 4 1.4 1992 1 4.6 1992 2 1.5 1992 3 2.4 1992 4 2.2 查询结果 year m1 m2 m3 m4 1991 1.1 1.2 1.3 ... 阅读全文
posted @ 2008-11-19 18:11 share your knowledge with the world! 阅读(471) 评论(0) 推荐(0)