Get maximum value in table

Posted by Senthilmcatyr under Sql Server on 12/26/2011 | Points: 10 | Views : 1188 | Status : [Member] | Replies : 2
I have used this query "select max(REQUEST_NUMBER)+1 from PWD_STORES". it works fine. i truncate this table no one data in this table and run this query dont get maximum value. now i need maximum count value one. how do i get. if anyone know pls help me




Responses

Posted by: Sksingh on: 12/26/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Try this

select max(ISNULL(REQUEST_NUMBER,0))+1 from PWD_STORES


Regards,
Sunil

Senthilmcatyr, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sriramnandha on: 5/21/2012 [Member] Starter | Points: 25

Up
0
Down
SELECT MAX(VALUE)+1 FROM TABLENAME


sriram

Senthilmcatyr, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response