MsSQL

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesMsSQL

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old June 26th, 2012, 10:58 AM
younas02 younas02 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 1 younas02 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 31 sec
Reputation Power: 0
Select complete row having maximum value

i have a table with 4 fields, name, testname,marks,status. testname can b of different names. for exaple testname can b word, excel, power point. and thhese testname may b have repeated values i.e there can b 2 testname with word 2 with excel and so on.
there can b many records in table. the task is to select rows having maximum value in marks field.

i used select testname, max(marks) from tablename where name is='ali' group by testname,
it give correct results u can say if we have six record of three testname with 2 of each testname, it gives 3 records of maximum marks.
but when i want to select more than one column it gives all results of ali.
can any one help me????????

Reply With Quote
  #2  
Old June 27th, 2012, 10:33 AM
jamespayne's Avatar
jamespayne jamespayne is offline
Editor-in-Beef
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Sep 2008
Location: South Florida
Posts: 31 jamespayne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 9 h 48 m 44 sec
Reputation Power: 11
Hi,

You might want to try to post this question over at our sister forum known as the Dev Shed Forums:

www.forums.devshed.com

We have a lot of MySQL experts there that can help you. You'll have to create a new account, but you will likely get a faster response.

Hope to see you there!

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesMsSQL > Select complete row having maximum value


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap