select * from tablename a
where code=(select min(code) from tablename where style=a.style)
where code=(select min(code) from tablename where style=a.style)
解决方案 »
- 请教求救,这个分页的存储过程如何查询另一个表的字段呢?
- 求助消除重复列的问题
- 请问在视图或者表中间可以选择除了某一特定的列以外的所有列都显示出来的方法吗?
- 恳请赐教一段SQL语句的简单问题
- 如何在DTS中实现完全的数据库同步?比如源数据记录已经被删除,而目标数据记录也能被删除呢?
- 问一个sql语句的问题
- 为什么我的Sql server查询分析器会出现分析批查询……
- 时间模糊查询 vb
- 刚才太激动了,那么强大,现在开始请大家分析一下这个sql语句
- 问题解决了,给 j9988(j9988) 的另外400分 (4)
- 用存储过程,如果表里没有记录,怎么控制,不让查询???等待专家指点;;
- 朋友请教,一定给分。(SQL语言应用问题)
(select min(code) as code from tableName group by style) b
where a.code=b.code
where code in (select min(code) from test2 group by style)
right join
(select min(code) from tablename group by style) as B
on A.code = B.code
group by style