how do you select an autonumber datatype when inserting a new row


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how do you select an autonumber datatype when inserting a new row

  1. #1
    Steve Guest

    how do you select an autonumber datatype when inserting a new row


    Does anyone know how to select an incrementing datatype while inserting a
    new record using one sql statement?

  2. #2
    Mehdi Mousavi Guest

    Re: how do you select an autonumber datatype when inserting a new row

    Take the row that contains the greatest autonumber, by calling
    MAX(yourAutoNoField)
    or
    Take the newest row that is inserted to the table, by processing its date of
    insert

    HTH,
    Mehdi
    --
    Got a question about modems? Take a look at http://www.modemmania.com
    "The important thing is not to stop questioning. -- Albert Einstein"


    "Steve" <steve_woodcock@med3000.com> wrote in message
    news:3a1be8e7@news.devx.com...
    >
    > Does anyone know how to select an incrementing datatype while inserting a
    > new record using one sql statement?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center