文章分类 -  SQL(simple)

easy simple
union all 和union
摘要:union all 和union 阅读全文

posted @ 2008-02-20 15:56 梦飞天蝎 阅读(85) 评论(0) 推荐(0)

SQL sever中根据日期判断今天是星期几
摘要:select datename(weekday,getdate()) 結果: ------------------------------ 星期三 (影響 1 個資料列) 阅读全文

posted @ 2008-02-20 15:55 梦飞天蝎 阅读(852) 评论(0) 推荐(0)

Sql Server、 Access数据库 判断字段是否为空的办法
摘要:Sql Server: IsNull 如果是Null,就返回指定的值,否则返回原值。 select userName,IsNULL(address,'无') from [user]... ------------------------------------------------------------------ NullIF 会在两个值(或者表达式)相等的时候返回null,否则... 阅读全文

posted @ 2008-02-19 15:10 梦飞天蝎 阅读(1762) 评论(0) 推荐(0)

sql 取各组中的最大值
摘要:正文: 表test id name record 1 a 88 2 b 76 3 c 66 4 c 90 5 b ... 阅读全文

posted @ 2008-02-19 03:59 梦飞天蝎 阅读(155) 评论(0) 推荐(0)

导航