之所以提出这点在这里就是因为select刷选的记录只有一条
当出现多条重复的记录时,只选择最后一条。
1.select * from cc
declare @wexam int
select @wexam =wexam from cc
where sno=95005
print @wexam
go
表cc:
在表cc中存在两条sno相同的记录,
在不进行order by 排序时就直接会显示1.的代码显示的结果为-77,
使用order by
2.select * from cc
declare