几个sql题目
摘要:
1 找到ppp表里面num最小的数,不能用min函数:select top 1 num from ppp order by num;如果用min函数到话,直接elect * from ppp where num=(select Min(num) from ppp)2 选择表ppp2中num重复的记录。答: select * from ppp2 where num in(select num from ppp2 group by num having(count(num)>1))。 这里嵌套语句的意思,是按照num个数分组,多少个不同的num就分成多少组,然后找里面num重复的。count 阅读全文
posted @ 2012-10-24 10:56 AllenZhao 阅读(182) 评论(0) 推荐(0)
浙公网安备 33010602011771号