Click here to Skip to main content
15,794,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a table column named myvalues, an webpage contains one button. i want when user click on button it takes the highest value from that myvalues column and show it on the page. how is it possible.?
Christoph Keller 16-Jul-11 13:47pm    
Why you don't look at the answers of your previous posted (same) question here:

You need an SQL Command similar to:
SELECT MAX(myColumn) FROM myTable
Share this answer
Uday P.Singh 16-Jul-11 3:50am    
correct my 5!
SqlCommand cmd = new SqlCommand("select max(myColumn) as myColumnfrom myTable", con);
        string  a =Convert.ToString( cmd.ExecuteScalar());


use it
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900