query of select max number
-
Hi, i have a DB table which has just only one column, i have an integer column field in it, i want to know the query for retriving not the highes number (i mean as select max of the column) i want the select the number comes before the max number, ;)
Thanks alot Hamody
-
Hi, i have a DB table which has just only one column, i have an integer column field in it, i want to know the query for retriving not the highes number (i mean as select max of the column) i want the select the number comes before the max number, ;)
Thanks alot Hamody
-
Here you go... SELECT Max(myIDColumn) FROM myTable This will return the highest number in a column from a table.
When people make you see red, be thankful your not colour blind.
hello, thanks i know that SELECT Max(myIDColumn) FROM myTable will return the highest or max number, i want to get the number comes before the max number not the max itself :((
Thanks alot Hamody
-
hello, thanks i know that SELECT Max(myIDColumn) FROM myTable will return the highest or max number, i want to get the number comes before the max number not the max itself :((
Thanks alot Hamody
-
Sorry didn't read you post very well. SELECT Max(myIDColumn - 1) FROM myTable
When people make you see red, be thankful your not colour blind.
thanks a lot there, merci beacoup :rose:
Thanks alot Hamody
-
thanks a lot there, merci beacoup :rose:
Thanks alot Hamody
I think this will work if the number u require is always 1 less than the max number. Here is the command for the column which have random values. select max(colName) From tblName where colName not in( select Max(colName)From tblName) Regards, Arun Kumar.A