
sql
杰弗瑞王
这个作者很懒,什么都没留下…
展开
-
sql學習
update table set col=~col where col=5 update a set a.ziduan= b.ziduanFROM biao AS a,biao AS bwhere a.id=44 and b.id=43转载 2013-06-13 11:54:56 · 494 阅读 · 0 评论 -
sql按日期排序並特殊id置底
select * from fairs where iscms=0 order by case when fair_id=28 then dateadd(year,100,fairdatei) else fairdatei end asc原创 2013-07-18 11:22:16 · 708 阅读 · 0 评论 -
select max(ID)查询char类型,获取到的最大值只能到9的問題
字符比较是按位取值,id第一位最大值就是9了,需要先转换一下数据类型 SELECT MAX(convert(int,substring(id,1,len(story_id)))) FROM table WHERE col='test' id 1 2 3 4 5 6 7 8 9转载 2013-07-11 10:44:00 · 4017 阅读 · 0 评论