469,072 Members | 1,838 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,072 developers. It's quick & easy.

LIMIT on a condition

Hi all
I am trying to get info from a table in this form :

table_1
jobid(PK) projectid desc
------------------------------------------
1 1 whatever
2 1 .
3 1 .
4 2 .
5 2 .
. . .
. . .
. . .

What I am trying to get is a query which will give me only 5 rows per projectid. ( a LIMIT on the WHERE statement but not on the whole SELECT)
If I use LIMIT, I get a total of 5 results.

Thanks in advance
nsteiner
Jul 26 '09 #1
0 1186

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Bernard Drolet | last post: by
reply views Thread by Mojtaba Faridzad | last post: by
20 posts views Thread by http://links.i6networks.com | last post: by
6 posts views Thread by Rory Campbell-Lange | last post: by
5 posts views Thread by Jefferis NoSpamme | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.