看板Programming
标 题Re: [问题] sql的min
发信站交大资科_BBS (Tue Jun 20 00:09:23 2006)
转信站ptt!ctu-reader!ctu-peer!news.nctu!netnews.csie.nctu!news.ee.ttu!news.c
==> 在 [email protected] (没有怎麽办) 的文章中提到:
> 我找到一种写法
> select student, score
> from t
> where score=(
> select min(score)
> from t
> )
> 但是对於这种写法,因为我的t其实是另一个很长的子句
> 上面这种写法有两个一样的t 程式变得非常丑...
若 t 很常用, 又嫌它丑的话,
就把它作成一个 view 吧.
--
* Origin: ★ 交通大学资讯科学系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>