- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 按某一字段排序生成名次
select rank=count(*), a1.studentname, a1.score from student a1, student a2 where a1.score >= a2.score group by a1.studentname, a1.score
2009-12-24 13:18:00 337
转载 convert函数转换日期格式
SQL Server中文版的默认的日期字段datetime格式是yyyy-mm-dd Thh:mm:ss.mmm 例如: select getdate() 2004-09-12 11:06:08.177 整理了一下SQL Server里面可能经常会用到的日期格式转换方法: 举例如下: select CONVERT(varchar, getdate(), 120 ) 2004-09-12 11:06
2009-05-12 23:20:00 653
原创 Sybase 中的替换函数
str_replace (string1,string2,string3) 使用string3值替换 string1中的string2 字符串。stuff(string, from_position, len , newstring ) 将string中从第from_position位开始后的len位字符用字符串newstring替换
2009-05-12 15:35:00 1399
转载 Sybase函数
长度和语法分析 datalength(char_expr) 在char_expr中返回字符的长度值,忽略尾空 substring(expression,start,length) 返回部分字符串 right(char_expr,int_expr) 返回char_expr右边的int_expr字符 基本字符串运算 upper(char_e
2009-05-12 15:12:00 346
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人