472,145 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 1219

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 Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.