日期:2014-05-17  浏览次数:20506 次

创建一个表主键用的字符串,查询时总是显示按字母顺序排列
能不能按插入的时间排序;
比如我插入数据的顺序是
a
1
b

结果查询时晕示为
1
a
b


------解决方案--------------------
--添加时间字段

alter table tb add inserttime datetime default(getdate())
go

--然后 
select * from TB order by inserttime asc