Return max value from SQL db

Results 1 to 3 of 3

Thread: Return max value from SQL db

  1. #1
    Lori Braegelmann Guest

    Default Return max value from SQL db

    I need to find out the value of a field in the last record added in a database. This field is a type autonum and the key of the table. I will then need to add 1 to it and display it to the screen. I'm thinking the Max keyword will be involved but I'm not very savy on ASP/SQL Server yet.

  2. #2
    Join Date
    Dec 1969

    Default select max(col_name) from tblName

    select max(col_name) from tblName

  3. #3
    Reggie Guest

    Default RE: Return max value from SQL db

    Check out this FAQ:<BR><BR><BR>It gives a "bad" way which will work for what you&#039;re doing and it gives the "proper" way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts